Forum Moderators: phranque

Message Too Old, No Replies

Single URL blog post on 301 redirect loop

         

batface

7:52 pm on Sep 29, 2011 (gmt 0)

10+ Year Member



This is very strange and I wonder if anyone has come across this -

I have one blog post that goes on a 301 redirect loop.

www.example.com/blog/blah-blah-blah-1234/ redirects to
www.example.com/blog/blah-blah-blah-1234/ and so on (using Fiddler)

The htaccess rewrites URLs with a trailing slash if not available. Permalinks set to /%category%/%postname%-%post_id%/

All other posts are in the same format and open in a browser as 200 ok.

Redirection plugin is installed but the URL is not listed.

Any ideas?

g1smd

7:58 pm on Sep 29, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is it a single step redirect, or is there an intermediate URL?

batface

8:14 pm on Sep 29, 2011 (gmt 0)

10+ Year Member



It seems to redirect straight to itself. Fiddler only reports the same URL. If it was the trailing slash Fiddler picks that up, but this there's nothing other than www.example.com/blog/blah-blah-blah-1234/

g1smd

8:22 pm on Sep 29, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That's not going to be so easy to diagnose.

I was hoping there was another URL in the step, perhaps non-www or slightly different path or something.

I use the Live HTTP Headers extension for Firefox to see what is going on.

batface

5:36 am on Sep 30, 2011 (gmt 0)

10+ Year Member



LiveHeaders shows the same. In this scenario as it is a single post would it be best to recreate it and redirect to the new post, or could this issue indicate a more sinister underlying problem?

http://www.example.com/blog/blah-blah-blah-1234/

GET http://www.example.com/blog/blah-blah-blah-1234/ HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Proxy-Connection: keep-alive

HTTP/1.1 301 Moved Permanently
Date: Fri, 30 Sep 2011 05:23:33 GMT
Server: Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By: PHP/5.2.17
Vary: Cookie,User-Agent
Location: /blog/blah-blah-blah-1234/
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset="UTF-8"
----------------------------------------------------------
http://www.example.com/blog/blah-blah-blah-1234/

GET http://www.example.com/blog/blah-blah-blah-1234/ HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Proxy-Connection: keep-alive

HTTP/1.1 301 Moved Permanently
Date: Fri, 30 Sep 2011 05:23:33 GMT
Server: Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By: PHP/5.2.17
Vary: Cookie,User-Agent
Location: /blog/blah-blah-blah-1234/
Content-Length: 0
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/html; charset="UTF-8"

lucy24

6:46 am on Sep 30, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can you paste in the actual URL? Not the domain-name part, just the rest. The problem can't
:: fingers crossed ::
be in the domain name, since most of that was handled before it ever got to you. So it's got to be in the rest.

There are other possibilities, but let us not go there yet.

g1smd

6:47 am on Sep 30, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Something, somewhere is severely broken. I can't offer much in the way of suggestions about where to look though.

batface

9:38 pm on Sep 30, 2011 (gmt 0)

10+ Year Member



aha, the URL was in the redirection plugin, but removed - so that was discounted. However, go into the redirection table in SQL and delete entries that still exist for this URL (and they did!) and it is fixed.

g1smd

10:06 pm on Sep 30, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That's more than a tad obscure and you're about the only person who could have worked it out. :)