Disable mod_rewrite in specific directory
This tutorial explains two ways to disable Apache’s
mod_rewrite in a specific directory.
Add the following snippet to the .htaccess file that is located in the directory for which you would like to disable
# disable mod_rewrite RewriteEngine off
That cold disables
mod_rewrite for the directory and any subdirectories. Best method if you do not need or want any rewriting in a specific directory.
Alternately, you can add the
[END] flag to any
. . . RewriteRule .* https://htaccessbook.com/ [END]
This tells Apache to stop rewriting for the current request. So any further directives will be ignored. This is useful if you need
mod_rewrite for some other purpose and want to prevent further rewriting. Learn more in the Apache Docs.
Here is a related article at Perishable Press that explains how to *allow* hotlinking in specific directories.