[Zen Cart] Adding a redirect rule
Re: [Zen Cart] Adding a redirect rule
Hi
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?
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
Then change it to:
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.
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
There are always only 8 random numbers letters after the ? :
http://www.mysite.com/?f2345678
http://www.mysite.com/?abcdef12
http://www.mysite.com/?f2345678
http://www.mysite.com/?abcdef12
Re: [Zen Cart] Adding a redirect rule
Then it can be changed to:
But there still be collisions with other 8 chars query strings.
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
You mean collision in case I have the same exact pattern
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?
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
Currently, it will work with any URL ending with 8 chars query string.
It means http://www.mysite.com/?xxxxxxxx or http://www.mysite.com/index.php?xxxxxxxx http://www.mysite.com/anyfile.html?xxxxxxxx etc.
It means http://www.mysite.com/?xxxxxxxx or http://www.mysite.com/index.php?xxxxxxxx http://www.mysite.com/anyfile.html?xxxxxxxx etc.