htaccess REGEX to accept a particular set of characters in URL
I have a particular set of characters that i want to mark as acceptable:
a-z
,A-Z
,0-9
,*
,%
,/
,\
,_
.
Now i am being able to create an .htaccess file that enables this for:
a-z
,A-Z
,0-9
,_
,
but the rest of the characters are not working. The url is giving a 404 error. here is the regex i am using
[a-zA-Z0-9_]
UPD开发者_开发百科ATE
PS- I have check many of the SO questions related to htaccess, but my problem is not solved. These were helpful, but whenever i try to add the remaining characters in the CHARACTER SET of my regex, its giving an 404 error.
almost all characters lose their special meanings inside a character class, including \
*
and /
Try this: [a-zA-Z0-9_\/%*]+
精彩评论