Forum Moderators: phranque
I haven't tested this, but, what happens in a redirect to a rewrite is the old URL gets redirected to the new, which a lot of times gets rewritten back to the old (dyanmic) which gets redirected again, creating an endless loop.
Of course, one solution is {THE_REQUEST} as mentioned here before, another which should create the same results, is to add an extra parameter or string tacked onto the end of the rewritten URL. (Since the client will never see the rewritten URL, it can be anything), and as long as you are doing an exact match for the redirect, it won't trigger/match the redirect again.
Just thought this might be useful.
Thanks for all the help here and keep up the good work!
CWebguy
[edited by: CWebguy at 8:18 pm (utc) on Mar. 12, 2009]
They have a redirect for
/category.php?cat=1&sub_cat=2 in place, but not one for /category.php?sub_cat=2&cat=1 and so requests using that URL format fail to be redirected. What about trailing ampersand, and/or leading or trailing junk too? They are all valid requests. If they are not redirected then the request WILL be passed to the script for processing - and if it returns content and 200 OK status, then that's yet another duplicate URL.
There are often dozens of correct ways to do things (along with thousands of incorrect ways). Among the correct ways, the one(s) you choose should be based on efficiency and simplicity. Beyond that, it's simply a matter of personal 'style.'
Jim