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

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -