- .htaccess mod_rewrite – how to exclude directory from rewrite rule
- Exclude Certain Folders from htaccess Rewrite Rules
- How to Exclude Folder from Rewrite Rule in .htaccess
Add the following line above your rule to exclude a directory (for example, journal) from rewrite rule
RewriteRule ^(journal)($|/) - [L]
To exclude multiple folders, use the following condition above your rule
RewriteCond %{REQUEST_URI} !^/(folder1|folder2/.*)$
OR
RewriteRule ^(folder1|folder2)($|/) - [L]
To exclude all existent directories, you will need to use the following condition above your rule
RewriteCond %{REQUEST_FILENAME} !-d