When a user types this into a browser:
http://cauzoom.com/collection/something0%d
I want them to end up here:
http://cauzoom.com/collection/index.html?pname=something
My current htaccess rewrite rule looks like this:
RewriteRule ^collection/([a-z0-9\-\%]+)$ collection/index.html?pname=$1 [NC,L]
… but that fails. When I do this:
RewriteRule ^collection/(.+)$ collection/index.html?pname=$1 [NC,L]
… it also fails. I know % is a protected regexp character, but putting the literal “\” in front of it SHOULD work, right? Any suggestions?
%isn’t a regular expression metacharacter, the problem is that it’s used to encode characters in URLs, so you can’t just use a literal%in an URL as it’s meant to start a sequence which identifies a special character: referenceIf you want to have a real
%in an URL you have to encode it as%25.