Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to put .htaccess file?

Tags:

.htaccess

I have some settings which I want to use in .htaccess file. The settings are for some functionality at /admin/tool folder level .. but I want to include some settings for /admin and / locations as well.

My question is what is the best location to put this file at??

Thanks

Update

Just fyi .. I want to apply settings like

max file upload size maz execution time etc 
like image 634
user187580 Avatar asked Jan 20 '10 17:01

user187580


People also ask

Where should htaccess file be located Apache?

htaccess file can be found at /opt/bitnami/APPNAME/. htaccess. Some applications do not have the /opt/bitnami/apache2/conf/vhosts/htaccess/APPNAME-htaccess.


2 Answers

Place general rules in:

/.htaccess 

Place /admin/ specific rules in:

/admin/.htaccess 

Place /admin/tool/ specific rules in:

/admin/tool/.htaccess 
like image 200
Alix Axel Avatar answered Sep 20 '22 11:09

Alix Axel


You can put your .htaccess in the top level directory and have it apply settings to specific subfolders.

like image 26
Citizen Avatar answered Sep 22 '22 11:09

Citizen