I have a rewrite rule
RewriteRule ^([A-Za-z0-9\/\-\_]+)+$ .?p=$1 [L]
But if I have % sign in url, it won't work. How do I modify this rule to work with percentage sign?
I have a rewrite rule
RewriteRule ^([A-Za-z0-9\/\-\_]+)+$ .?p=$1 [L]
But if I have % sign in url, it won't work. How do I modify this rule to work with percentage sign?
You can add the % to your character class ([…]). A character class specifies a group of characters that will be successful matches.
RewriteRule ^([A-Za-z0-9/_%-]+)$ .?p=$1 [L]