I have the following in my .htaccess file-

Redirect 301 / http://www.foo.com/south-carolina-real-estate/ Redirect 301 /related/aiken-sc.htm?tkn=MXNDbGxQjEAKEwj0qrmMz_OYAhUdBGoKHY43MKwYASAFMKCTDDgNUKCTDFDLuosP http://www.foo.com/south-carolina-real-estate/ Redirect 301 /related/aiken-sc.htm http://www.foo.com/south-carolina-real-estate/ Redirect 301 /related/spartanburg.htm?tkn=0bzl_HmfIxIKEwj0qrmMz_OYAhUdBGoKHY43MKwYASADMKCTDDgNUKCTDFDLuosP http://www.foo.com/south-carolina-real-estate/ Redirect 301 /related/spartanburg.htm http://www.foo.com/south-carolina-real-estate/

But when I visit http://www.url.com/related/aiken-sc.htm I get the following URL in the browser-

http://www.foo.com/south-carolina-real-estate/related/aiken-sc.htm

Not sure what the problem is, this works fine on other sites...?

link|improve this question
feedback

migrated from stackoverflow.com Nov 19 '09 at 5:08

This question came from our site for professional and enthusiast programmers.

2 Answers

Try using the Web Sniffer to follow what's going on. The Web Sniffer does not follow redirects: it shows you all the HTTP headers as they are sent.

One thing to bear in mind is that redirects should use the HTTP header "Location: ".

link|improve this answer
feedback

Rearrange your redirects to be most specific to least specific; Redirect will match any path element beginning with your match so it never gets past the first redirect directive.

Redirect 301 /some/full/path/file.html http://www.there.com/xx/yy/zz/foo.html
Redirect 301 /some/full/ http://www.there.com/xx/yy/
Redirect 301 / http://www.there.com/xx.html
link|improve this answer
feedback

Your Answer

 
or
required, but never shown