Answer the question
In order to leave comments, you need to log in
Why does Deny from xxxx and ErrorDocument 403 give a 302 redirect?
My htaccess file
Options All -Indexes
#Error
ErrorDocument 403 http://sitename/error/403
#запрет доступа к сайту по IP
Order Allow,Deny
Allow from all
Deny from *.*.*.*
#убираю пхп в конце
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
header("HTTP/1.1 403 Forbidden");
Answer the question
In order to leave comments, you need to log in
I understood what the problem was, deny redirected to the 403 page, but access was denied there too, there was no 403 response, I added htaccess to the error folder
#разрешен доступ всем
Order Allow,Deny
Allow from all
Because the ErrorDocument directive, when an absolute URL is specified as a parameter, performs a redirect on the corresponding error.
Apparently, the page with the error itself is also prohibited for you, therefore, when this page is requested, a redirect to it is performed again, and so on ad infinitum.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question