Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I configure an .htaccess of a sub-directory so that it COMPLETELY ignores the .htaccess of any parent directories?

Tags:

.htaccess

How can I configure the .htaccess of a sub-directory so that it COMPLETELY ignores the .htaccess of any parent directories?

Not just any rewrite rules, but EVERYTHING.

like image 210
ProgrammerGirl Avatar asked Nov 25 '11 16:11

ProgrammerGirl


People also ask

Does htaccess work on subdirectories?

htaccess file are applied to the directory in which the . htaccess file is found, and to all subdirectories thereof. However, it is important to also remember that there may have been . htaccess files in directories higher up.

Where do I put the .htaccess file?

Although the file is hidden, the . htaccess file location is most commonly found in your website's public_html folder.

What is Rewriteengine on htaccess?

htaccess rewrite rules can be used to direct requests for one subdirectory to a different location, such as an alternative subdirectory or even the domain root. In this example, requests to http://mydomain.com/folder1/ will be automatically redirected to http://mydomain.com/folder2/.


1 Answers

I can't put a comment

but will using this will work:

in your folder create a .htaccess and put this code:

RewriteEngine off

or

in your main .htaccess file you can use:

RewriteCond %{REQUEST_URI} !^/folder/?
like image 92
Gabriel Avatar answered Oct 05 '22 03:10

Gabriel