apache - How to write RewriteCond base on directory name character length? -
i trying learn how apply rewritecond based on length of "request uri", or directory name.
so 3 letter directories (/ark/, /pit/, /dyn/, etc), want apply rewritecond. doing this:
rewritecond %{request_uri} !(ark|pit|dyn) [nc]
which works, list can long , seems easier use regex or select 3 letter directories.
any ideas?
try this:
rewritecond %{request_uri} !([a-z]{3}) [nc]
this match folder name has lower case letters , in length of 3
Comments
Post a Comment