.htaccess exclude directory from mod_rewrite


/ Published in: Apache
Save to your folder(s)

In MODx, insert below:

# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d


Copy this code and paste it in your HTML
  1. RewriteCond %{REQUEST_URI} !^/name-of-directory(/.*)?$ [NC]
  2. RewriteRule .* rewrite?%{REQUEST_URI} [L]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.