------=_NextPart_000_0043_01C55BB3.C77D04E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I have Merchant Optimizer, and I'm trying to set up the mod rewrite =
rules so the merchant.mvc? product and category screen URLS rewrite to =
the MO pages. I am having problems because some product codes and =
categories have capital letters in them. When the URLs are rewritten, =
it keeps the caps in tact, but all of the MO pages are built with =
lowercase URLs.
I tried the suggested rules that come with MO docs:
RewriteEngine On
RewriteCond %{QUERY_STRING} Category_Code=3D(.*)& [NC]
RewriteRule ^(.*) http://storedomain.com/static/%1.html [R,L]
RewriteCond %{QUERY_STRING} Category_Code=3D(.*)$ [NC]
RewriteRule ^(.*) http://storedomain.com/static/%1.html [R,L]
RewriteEngine On
RewriteCond %{QUERY_STRING} Product_Code=3D(.*)& [NC]
RewriteRule ^(.*) http://storedomain.com/static/%1.html [R,L]
RewriteCond %{QUERY_STRING} Product_Code=3D(.*)$ [NC]
RewriteRule ^(.*) http://storedomain.com/static/%1.html [R,L]
This rewrote my URLs like this: =
http://storedomain.com/static/produc...&Product_Code=
=3Dproductcode =20
I have my Merchant2 files in my root directory, so maybe that's why. I =
finally fixed that problem by adding a ? to my rules like so:
RewriteEngine On
RewriteCond %{QUERY_STRING} Category_Code=3D(.*)& [NC]
RewriteRule ^(.*) http://storedomain.com/static/%1.html? [R,L]
RewriteCond %{QUERY_STRING} Category_Code=3D(.*)$ [NC]
RewriteRule ^(.*) http://storedomain.com/static/%1.html? [R,L]
RewriteEngine On
RewriteCond %{QUERY_STRING} Product_Code=3D(.*)& [NC]
RewriteRule ^(.*) http://storedomain.com/static/%1.html? [R,L]
RewriteCond %{QUERY_STRING} Product_Code=3D(.*)$ [NC]
RewriteRule ^(.*) http://storedomain.com/static/%1.html? [R,L]
Now this rewrites my URLs correctly except for the case issue I =
mentioned above:
http://storedomain.com/merchant.mvc?...ory_Code=3Dabc
is rewritten to:
http://storedomain.com/static/abc.html
However,
http://storedomain.com/merchant.mvc?...ory_Code=3DABC
is rewritten to=20
http://storedomain.com/static/ABC.html
which does not exist since MO converts it all to lowercase:
http://storedomain.com/static/abc.html
Can anyone suggest the proper syntax to rewrite the URLs to lowercase =
only? I've been looking at a million rewrite examples, and haven't =
found anything that works yet. =20
Thanks,
Amanda
------=_NextPart_000_0043_01C55BB3.C77D04E0--
Comment