开发者

.htaccess forcing error pages on SSL

开发者 https://www.devze.com 2023-04-13 06:14 出处:网络
I have the following piece of code in my .htaccess file to force redirecting to开发者_开发问答 custom error pages:

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号