(please excuse my broken apostrophe key, it shows up as ´) I have two entries in my root .htaccess . They are: ErrorDocument 403.4 /error_pages/403.4.html ErrorDocument 403.6 /error_pages/403.6.html Any time a 403 error is produced it always gives the 403.4 error page. I don´t think I am doing anything wrong, please help.
403.4 and 403.6 are HTTP status codes in IIS, not in Apache web server. You should use the following line in the .htaccess file instead: ErrorDocument 403 /error_pages/403.html Code (markup):
The problem is I need different error pages for the different errors - One is for when your ip is not whitelisted, one if you are not using SSL. I figured a workaround though - I made a seperate page for the one tree on my site - 403.6-sec.html - and have that be displayed for a 403. That page has javascript script that runs on page load that detects if the browser URL has https in it. If it doesn't it redirects to 404.4.html. It's not perfect, but it works.