Reset htacces for subfolders

I have a htacces file in my root folder with some base code. But I want all these instructions to be ignored in the "voxelforum.com" directory. How can I achieve this?

Thanks!

+8
.htaccess
source share
4 answers

Oddly enough, you first need to turn off rewriting and then turn it back on

Place the .htaccess file in a subfolder and add the following two lines:

 RewriteEngine Off RewriteEngine On 

Add your rewrite rules below


This worked for me, while just adding RewriteEngine On didn't work.

+9
source share

It depends on what rules you want to override:

If you want to disable rewrite rules, you can put the .htaccess file in a subfolder containing RewriteEngine On , and the rules for the parent folder will be disabled (technically, replaced).

Similarly, if you want to disable authentication for a subfolder, you can create .htaccess containing Satisfy Any .

.htaccess cascades up, so Apache will look for the .htaccess file in the current folder and use the rules for it, then check the parent folder, etc.

+8
source share

Place the .htaccess file in a subfolder and add only this line:

Rewriteengine on

+2
source share

Remove htaccess from the root folder and move it to your subfolders. As far as I know, there is no way to disable htaccess for the root folder.

EDIT: check AllowOverride

+1
source share

All Articles