Forum Moderators: phranque
www.example.com\convoluted\directory\structure.php?with=complex&URL=strings
to
www.example.com\simple.html
This is all fine. But it has been such a successful transformation that it now upsets my sense of aesthetics that pre-existing external links to the site still display the convoluted URL string.
Unless I'm missing something very obvious (always possible) I can't see any way to rectify this short of getting the linking web sites to change the URL to which they're linking.
Am I missing something? Can this be tidied up easily?
Then I thought that fear might be founded on a misunderstanding of how mod_rewrites and 301s work, so over the weekend I sat down and tried it on one page and, sure enough, putting the 301 in seemed to slow the loading of a page to a crawl and then an eventual 404 error.
I wasn't completely convinced this was due to any kind of infinite looping, but regardless of what variation I tried it either a) didn't work at all or b) resulted in locking the page up as described above
I googled for solutions but without much success. Eventually I gave up on that approach. I think what I'm going to do now is this:
make a copy of my existing pages in
\complex\directory\structure\with?long=URL
to
\difficult\directory\structure\with?long=URL
and do mod_rewrites to the latter
Then once that's set up, I'll remove my current
\complex\directory\structure\
and add a whole heap of 301 redirects to pick up existing external links and redirect them to the new, short URLs.
Seems a convoluted process to me, but I can't seem to get it to work any other way.
Welcome to WebmasterWorld!
WebmasterWorld member WitchKing has recently posted a solution to this "infinite loop problem" in this thread [webmasterworld.com] in the Apache forum.
Jim