<? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.new-url.com" ); ?>
The Ultimate PHP 301 direct/forwarding thread!
Started by Dan, Jun 28 2006 05:30 PM
6 replies to this topic
#1
Posted 28 June 2006 - 05:30 PM
If you don't know what a PHP 301 redirect is, you will by the end of this thread! If you need to redirect a page, unfortunately it isn't as simple as using one of the various methods - only the 301 redirect will preserve search engine rankings for the page. It is the most efficient, search engine friendly method for website redirection - the code 301 is interpreted as "moved permanently".
|
|
|
#2
Posted 29 June 2006 - 07:26 AM
I use just the bottom line to forward.
I suppose I should add the 301 line.
<?php Header( "Location: http://www.new-url.com" ); ?>
I suppose I should add the 301 line.
#3
Posted 29 June 2006 - 04:52 PM
Yes you should. Otherwise the server doesn't know why the forward is there. 301s are important so you should take the time to add the extra line.
#4
Guest_Kaabi_*
Posted 05 July 2006 - 06:56 PM
Guest_Kaabi_*
The PHP redirect is so simple, the "ultimate" makes it sound intricate. It's so funny Dan, you've made a lot of "Ultimate 301 redirect" threads, and it's not even that special a function. You make me laugh (in a good way).
#5
Posted 05 July 2006 - 10:49 PM
Kaabi said:
The PHP redirect is so simple, the "ultimate" makes it sound intricate. It's so funny Dan, you've made a lot of "Ultimate 301 redirect" threads, and it's not even that special a function. You make me laugh (in a good way).
I have added them for every language rather than just post one thread in the "general" forum - I think this will make it easier, and more useful for peple who visit the site.
I just used the word "ultimate" as it is the only thread you will need to learn how to do a 301 redirect in that particular language :)
#6
Guest_Fredto_*
Posted 06 July 2006 - 08:36 AM
Guest_Fredto_*
I use a .htaccess for my redirections.
It's simple to use and I have to edit only one file for an entire folder ;)
It's simple to use and I have to edit only one file for an entire folder ;)
#7
Guest_Kaabi_*
Posted 08 July 2006 - 12:16 PM
Guest_Kaabi_*
Makes sense, and ultimate is an attractive word. Fredto, does an .htaccess redirect preserve search engine rankings? That's a very important thing that a redirect should do.


Sign In
Create Account


Back to top









