Forum Moderators: phranque
What I wish to accomplish is have everything under-
www.mysite.com/store/
301 redirect to-
www.mysite.com/
I have this code so far-
Options +FollowSymLinks
RedirectMatch permanent ^/store/*$
[mysite.com...]
This seems to work if I browse to-
www.mysite.com/store/
but if I browse any deeper to say-
www.mysite.com/store/some_url.htm
it does not seem to behave as I'd like.
(www.mysite.com/some_url.htm)
Can anyone help?
I'm afraid however that I'm getting some bizarre interaction with some RewriteRule rules I have in place now.
RewriteEngine On
Options +FollowSymLinks
RedirectMatch permanent ^/store(/.*)?$ http://www.example.com$1
RewriteRule ^index.html$ index.php
RewriteRule ^(.*)/(.*)-search-(.*)-(.*)-(.*).html index.php?Operation=ItemSearch&SearchIndex=$1&$2=$3&Sort=$4&ItemPage=$5 [QSA,L]
RewriteRule ^(.*)/(.*)-search-(.*)-(.*).html index.php?Operation=ItemSearch&SearchIndex=$1&$2=$3&Sort=$4 [QSA,L]
RewriteRule ^(.*)/(.*)-search-(.*).html index.php?Operation=ItemSearch&SearchIndex=$1&$2=$3 [QSA,L]
RewriteRule ^(.*)/browse-(.*)-(.*)-(.*).html index.php?Operation=ItemSearch&SearchIndex=$1&BrowseNode=$2&Sort=$3&ItemPage=$4 [QSA,L]
RewriteRule ^(.*)/browse-(.*)-(.*).html index.php?Operation=ItemSearch&SearchIndex=$1&BrowseNode=$2&Sort=$3 [QSA,L]
RewriteRule ^(.*)/browse-(.*).html index.php?Operation=ItemSearch&SearchIndex=$1&BrowseNode=$2 [QSA,L]
RewriteRule ^(.*)/(.*).html index.php?Operation=ItemLookup&ItemId=$1 [QSA,L]
RewriteRule ^(.*).html?$ index.php?SearchIndex=$1 [QSA,L]
What happens now is that a request for-
http://www.example.com/store/B0000223IK/Makita_2703_10__Table_Saw_with_Carbide_Blade.html
goes to-
http://www.example.com/B0000223IK/Makita_2703_10__Table_Saw_with_Carbide_Blade.html?Operation=ItemLookup&ItemId=store/B0000223IK
instead of just-
http://www.example.com/B0000223IK/Makita_2703_10__Table_Saw_with_Carbide_Blade.html
Hope you can help.
[edited by: jdMorgan at 11:58 pm (utc) on Sep. 4, 2005]
[edit reason] No URLs, please. See TOS. [/edit]