ErrorDocument doesn’t work
-
Hello. My .htaccess config is using redirecting rules (HTTP -> HTTPS). I think error logging (403.php) doesn’t work because of this redirecting rules.
I have shortened the .htaccess file for the example:
ErrorDocument 403 /wp-content/plugins/bulletproof-security/403.php RewriteEngine On RewriteBase / # For example disable .log files <IfModule mod_rewrite.c> RewriteCond %{REQUEST_URI} (\.log) RewriteRule .* - [F,L] </IfModule> # Redirecting rules HTTP to HTTPS <IfModule mod_rewrite.c> RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] </IfModule>
1) https://example.com/test.log -> Works fine.
2) https://example.com/test.log -> Doesn’t work.Please have a look at my screenshot:
- This topic was modified 3 years, 11 months ago by .
- This topic was modified 3 years, 11 months ago by .
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘ErrorDocument doesn’t work’ is closed to new replies.