0

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...?

2 Answers 2

0

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: ".

0

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

You must log in to answer this question.