This is an old post. The information it contains is probably out of date or innacurate
This is a post that was written a long time ago and is only being kept here for posterity. You should probably look up more recent blog posts related to the subject you are researching
If you are changing your URL structure, for example when moving to a search engine friendly URLs system, you need to be able to let Google and all the other search engines that the page has moved to the new URL. You really don’t want to display the same content on two URLs
So to achieve this we can do what is called a 301 redirect. This is a special redirect message which basically says “has permanently moved to”. By doing this, all of the search engine power, rank or whatever you want to call it will be directly transferred to the new URL.
Sometimes your script might spit out the headers earlier than you expect. If this happens then your site will fail completely to load with a fatal error along the lines of
warning: Cannot modify header information – headers already sent by (output started at .…
Note script tags need spaces removing
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17