![]() |
|
07.21.09 Correctly Using 301 Redirects For Multiple Browser Types By Richard HearneInteresting case I came across yesterday. A URL which 301 redirected went to different URLs in different browsers. First thought – the server was redirecting different UAs to different pages. But no, the redirect was exactly the same regardless of UA. So how come different browsers ended up in different locations? In fact the Location was the problem:
The problem was that the redirect header had two Location attributes. Firefox 3.5 followed the last Location value, while Chrome followed the first. In 2 different browsers the client ended up in different locations. The answer: Each redirect header should have only 1 Location attribute, and the value should be a fully formed URL (a value of "/" is technically incorrect). Hopefully this might help someone else debug a redirect which sends different browsers to different pages/locations. Comments About the Author: Richard Hearne is the founder of Red Cardinal, a dedicated search marketing consultancy. A frequent contributor to Google's Webmaster Group, Richard regularly advises clients on Internet marketing strategy and Search Engine optimisation campaigns. Richard's thoughts and research can be found on his search marketing blog. |
|||||||
|
| ||
-- TheDevWeb is an iEntry, Inc. publication -- |