I recently changed my permalinks from /%postname%/ to /%category%/%postname%/
And I have just set up 301 redirects in my htaccess to redirect some old posts (that have incoming links to the old structure).
However one of them ends up in an infinite loop. Essentially the %postname% and %category% are the same and that seems to be causing the problem
So my 301 command is:
redirect 301 /the-phrase/ http://mydomain.com/the-phrase/the-phrase/
And if I try to go to /the-phrase/ I end up in a loop.
I also tried to redirect it to another page (home page)
redirect 301 /the-phrase/ http://mydomain.com/
This works. BUT it breaks the links for anything in that category so
/the-phrase/another-post/
will then try to redirect to
http://mydomain.com/another-post/ .... which doesn't exist
Any ideas how I can get this redirect to work?
I want the specific URL http://mydomain.com/the-phrase/ to redirect to http://mydomain.com/the-phrase/the-phrase/ and nothing else to be affected
Any assistance much appreciated
Cheers
Brett



LinkBack URL
About LinkBacks



Reply With Quote