.htaccess rewrite rule to exclude folder

Many times you need to have a folder not included in your .htaccess file’s rewrite rules. In order to exclude or skip the following can be done as part of the rewrite statement to allow this. This rule would be added after the last condition before you main rewrite rule you are preforming.

RewriteRule (^folder1|^folder2) – [L,NC]

You can add as many or as few folders as you wish. Just follow the same format of |^folder3