Remove htaccess rewrite rule from subfolder

By this article i will explain you how can we Remove htaccess rewrite rule from subfolder or Directory and how can you start rewrite engine in htaccess.

If you don’t want to apply htaccess rule in you sub directory so you can use this htaccess script.sometimes user want to allow htaccess rule for some directory but some directory he want to free from htaccess rules that’s why I am explaining you how can you prevent your project directories from rewrite rules.

This is the vary simple script to restrict htaccess rewrite rule in child directory in your folder structure.

Add below script in your .htaccess file. by using this script rewrite rule will not apply for your given folders or directory. you can also set all directory whichever you want for run without rewrite rule so you can set like this inside brasses : (user|admin|product) here user,admin,product all are the directories.

RewriteEngine On
RewriteRule ^(type here your folder name)($|/) - [L]

Example :

RewriteEngine On
RewriteRule ^siteadmin($|/) - [L]

by using this script you can prevent your directories from htaccess rewrite rules. One more thing to do you have to on Rewrite Engine like this RewriteEngine On.