Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to see .htaccess file of any website?

Tags:

.htaccess

Ex. I open http://www.delfi.lt via browser, can I somehow access/open/download .htaccess file of this site?

I read that .htaccess is visable to any browser if it's not hidden by apache. Does apache block access to .htaccess file by default?

like image 767
Justinas R. Avatar asked Oct 03 '22 06:10

Justinas R.


1 Answers

Access to .htaccess is disabled by Apache config similar to this in httpd.conf:

# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>
like image 78
anubhava Avatar answered Oct 07 '22 19:10

anubhava