Search Marketing

   
   

Apache RewriteEngine Rule - do not apply to Specific Directories

Sun Sep 30, 2007 6:36 pm
    >>
Comments: 0 Views: 520

If you are using rewrite rules in the Apache Web Server for url rewriting and do not want the rules to apply to specific directories you can use the following code.

Begin rewrite engine:

RewriteEngine On

Specify the directory you do not wish to be affected

RewriteCond %{REQUEST_URI} !^/dir

Continue with whatever your rules are.

RewriteRule ^/([^/]*)/?var=$1 [PT]

To use Apache rewrite rules on your server you must apply the above within your virtual host file.

Note: PT - pass through



Comments
Name:
*
URL: http: (ex. cnn.com)
Comment:
*
Number:
Math (21 + 3)
* required

© 2019 Christonium LLC

Christonium.com
|
Terms of Use
|
Privacy
ccc