Forum Moderators: phranque

Message Too Old, No Replies

.htaccess location

         

vince786

3:38 pm on May 5, 2011 (gmt 0)

10+ Year Member



I am using apache2 as the web server and tomcat as the application server and I need to include a .htaccess file. My thought was that it needs to live in the apache2 environment. The doc says that the .htaccess must be in the web root folder so I am a bit lost as to the exact location. Would appreciate any pointers.

Thanks.

wfco

4:33 pm on May 5, 2011 (gmt 0)

10+ Year Member



The .htaccess controls the directory where it is placed, and any subdirectories. It should be placed at the docRoot of your apache server.

g1smd

7:19 pm on May 5, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It should be at
example.com/.htaccess
as seen from the web. Since it should not itself be accessible from the web, then it should be in the same folder as the
example.com/robots.txt
file.