This is a discussion on "php redirect" within the PHP Forum section. This forum, and the thread "php redirect are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
php redirect
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
||||
|
||||
|
php redirect
could someone tell me how i can redirect this page
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
|
|
|
|
#2
|
|||
|
|||
|
Re: php redirect
Do you mean that anytime anyone calls page A you want it to go to page B?
If you do, then this is best handled in the .htaccess file. If you want to be able to redirect as a result of some processing, then that's a different issue. |
|
#3
|
||||
|
||||
|
Re: php redirect
it is basically part of a blog, it has to go througth that page to get to the latest blog
so i want it just to redirect to the latest blog automatically, so i can link my normal html pages to that page and as soon as they click on the option they will be redirected to the latest blog example :- link ( click ) --> that page above ( auto redirect ) --> latest blog p.s - the latest page would be called something like 0606blog.txt ( MMYYblog.txt )
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Last edited by saltedm8; Jun 17th, 2006 at 19:02. |
|
#4
|
|||
|
|||
|
Re: php redirect
Have I got the right idea? You don't want people to see the above page at all? All that code is just a dummy effectively? Or are you wanting the redirect to take place from within the function called by the 'Go' button? |
|
#5
|
||||
|
||||
|
Re: php redirect
( yes, i think you have the right idea )
if possible i dont want them to see that page, but i have to be able to link to it from my normal html pages, so they are instantly re-directed to the latest blog, no 'go' button ( the whole point is so that each time i make a blog, i do not have to change the links in my html pages to go to the latest blog ) effectivly, all i want to use that page for is to re-direct to the latest blog ( not possible in html )
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Last edited by saltedm8; Jun 18th, 2006 at 12:28. |
|
#6
|
|||
|
|||
|
Re: php redirect
It's entirely possible in html. You just need a refresh meta tag.
You might as well get rid of all the extra code on this page so as to maximise download speed. You should be aware that search engines are a bit wary of redirects like this. Perhaps it's something Rob could comment more on. The better alternative is to not have this file exist at all and redirect any calls to it through your servers .htaccess file. |
|
#7
|
||||
|
||||
|
Re: php redirect
but that wont change to go to the latest blog automatically whenever i add a new page ( that is the problem i am trying to solve )
which is why i wanted to try to intrigrate something like this somehow
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Last edited by saltedm8; Jun 18th, 2006 at 12:45. |
|
#8
|
|||
|
|||
|
Re: php redirect
Surely somewhere along the way you are going to have to tell the system where the latest blog is? It can't guess! So for example, whenever you create a page you add the link, 'bloglink.html'. Now you can either have an actual page 'bloglink.html' and use the meta code I posted previously that contains the link to the lastest blog which you will have to keep updated. Or you can have an entry in your .htaccess file that effectively tells the server, whenever you get a call for 'bloglink.html' serve this page instead - 'bloglatest.html' and you keep this entry updated. |
|
#9
|
||||
|
||||
|
Re: php redirect
Quote:
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
|
|
#10
|
|||
|
|||
|
Re: php redirect
Yes, I think we can come up with something pretty straight forward. Going off to do the the brand new grandparent bit this afternoon so I will get back to you tomorrow when I've had time to think through the solution. |
|
#11
|
||||
|
||||
|
Re: php redirect
( congrats ) and thank you, appreiated
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Last edited by saltedm8; Jun 19th, 2006 at 12:46. |
|
#12
|
|||
|
|||
|
Re: php redirect
Question - Are your blog pages standard .html pages put together by yourself or are you using some form of blog software such as Wordpress. |
|
#13
|
||||
|
||||
|
Re: php redirect
i have - addblog.php, blog.php, add_to_blog.html, blog.txt and 0606blog.txt, all custom made - no external software, designed like that so it does not need a database
if it would be easyier to see them, just send me a private message with your email address and i will send them to you
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Last edited by saltedm8; Jun 20th, 2006 at 18:21. |
|
#14
|
|||
|
|||
|
Re: php redirect
I'll let you know if I think I need to see them. For the moment, what is actually created? Is each new blog page a seperate .html file stored in the same directory? |
|
#15
|
||||
|
||||
|
Re: php redirect
each new blog page is a txt file - eg 0606blog.txt, it is inserted into blog.php, www.luv-2-cook.com/blog.php which is also the template
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Last edited by saltedm8; Jun 20th, 2006 at 18:51. |
|
#16
|
|||
|
|||
|
Re: php redirect
This seems to have become a two way conversation so lets close this thread and use PMs. One coming your way. |
|
#17
|
|
|
|