0

I have the following piece of code in my .htaccess file to force redirecting to custom error pages:

ErrorDocument 404 /ErrorPages/404.php
ErrorDocument 403 /ErrorPages/403.php
ErrorDocument 400 /ErrorPages/generalError.php
ErrorDocument 401 /ErrorPages/generalError.php
ErrorDocument 500 /ErrorPages/generalError.php

Everything works fine on port 80, but when it comes to SSL, the standard error pages are shown.

To be more specific:

http:www.mydomain.com/NoExistingPage.php redirects to the custom error page https:www.mydomain.com/NoExistingPage.php DOES NOT redirect to the custom error page

am I missing something here?

Thanks in advance

2
  • Is there a separate directory that holds your secure stuff or is it the same directory? Oct 14, 2011 at 17:21
  • Yes, there is the /secured folder with all the must-be-SSL pages on it. Oct 14, 2011 at 18:17

1 Answer 1

0

Try putting a duplicate .htaccess file in the /secured folder and see if that works. The vhost for the https daemon is probably using /secured as doc_root which means even if the .htaccess from the regular doc_root is below the secured folder it will be ignored.

1
  • sorry for the delay! I was at work and forgot to check back :) Oct 15, 2011 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.