I’m facing an issue in Apache httpd. In the littpd.conf. Inside the rewrite.mod I am blocking requests which have these 3 headers
X-HTTP-METHOD
X-HTTP-Method-Override
X-METHOD-OVERRIDE
And the response code to be 403 and reditecting it to a custom 403 error page. Providng the code the below:
#Block requests with X-HTTP-METHOD header RewriteCond %{HTTP:X-HTTP-METHOD]!=”” RewriteRule ^ – [F]
#Block requests with X-HTTP-Method-Dverride header RewriteCond %(HTTP:X-HTTP-Method-Override) !=””
RewriteRule ^ – [F]
#Block requests with X-METHOD-OVERRIDE header RewriteCond %{HTTP:X-METHOD-OVERRIDE) 1-
RewriteRule ^ – [F]
But, I am getting the below message in the front end
You don’t have permission to access this resource.
error was encountered while trying to use an Eccoclocument to handle the request.
Additionally, a 403 Forbidden
1 AHB0124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternal Recursion to increase the limit if necessary. Use LogLevel debug to get a backtrace, referer: is provided here
And in the error logs of httpd
How to fix this issue?
I added rewritecond and rewriterule in rewrite mod tag. I was expecting 403 custom error page to come up but. I was getting a permission denied error for accessing the resources.
My guess is that the https isn’t able to take the file path. But for other 403 errors the custom error page is coming properly