[Zen Cart] Adding a redirect rule
Re: [Zen Cart] Adding a redirect rule
I have a problem, the redirect works fine but it does redirect everything like:
http://www.mysite.com/abcd8/login.php
to
http://www.mysite.com/abcd8/login.php?aid=
which is a big problem as for example, i can no longer log as admin...
I there a way to redirect only urls with this very specific format:
http://www.mysite.com/?abcd2
to
http://www.mysite.com/?aid=abcd2
and not the others urls?
Re: [Zen Cart] Adding a redirect rule
Code: Select all
RewriteCond %{QUERY_STRING} ^([a-z0-9]+)$ [NC]
RewriteRule (.*) http://www.mysite.com/$1?aid=%1 [R=301,L]
Please bear in mind there may be also other collisions with more URLs. It is just to general to identify "?abcd". It can be (partially) worked-around if length or minimal number of characters would be known.
Re: [Zen Cart] Adding a redirect rule
http://www.mysite.com/?f2345678
http://www.mysite.com/?abcdef12
Re: [Zen Cart] Adding a redirect rule
Code: Select all
RewriteCond %{QUERY_STRING} ^([a-z0-9]{8})$ [NC]
RewriteRule (.*) http://www.mysite.com/$1?aid=%1 [R=301,L]
But there still be collisions with other 8 chars query strings.
Re: [Zen Cart] Adding a redirect rule
http://www.mysite.com/?xxxxxxxx
/ + ? + 8 numbers letters
or could be other pattern?
as long there is no
/?
it should not redirect other urls right?
Re: [Zen Cart] Adding a redirect rule
It means http://www.mysite.com/?xxxxxxxx or http://www.mysite.com/index.php?xxxxxxxx http://www.mysite.com/anyfile.html?xxxxxxxx etc.