regex - mod_rewrite allow percentage sign in url -


i have rewrite rule

rewriterule ^([a-za-z0-9\/\-\_]+)+$ .?p=$1 [l] 

but if have % sign in url, won't work. how modify rule work percentage sign?

you can add % character class ([…]). character class specifies group of characters successful matches.

rewriterule ^([a-za-z0-9/_%-]+)$ .?p=$1 [l] 

Comments

Popular posts from this blog

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -