A
A
Alexey Aleksin2016-11-15 21:01:33
PHP
Alexey Aleksin, 2016-11-15 21:01:33

Why is .htaccess being downloaded?

Why is htaccess downloaded by the browser when going to site.ru/.htaccess?
The site is hosted, the contents of the file -

AddDefaultCharset utf-8
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php


upd. will there be conflict with
<Files .htaccess>
 order allow,deny
 deny from all
 </Files>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2016-11-15
@leroyleroy

Add a line:
RewriteRule ^.htaccess$ - [F]

J
Jeros_Lite, 2016-12-19
@Jeros_Lite

Required to add the line:
RewriteRule ^.htaccess$ - [F]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question