开发者

.htaccess 300 handling

I have a page mypage.html which I need to change to mypage.php. If I upload mypage.php and remove mypage.html, I get a 300 Multiple Choice error开发者_StackOverflow from Apache.

Can I set the htaccess to check if a .php verion of a page is available before it shows an error?


Absolutely you can. same Rewrite rules apply, just a different rule.

RewriteBase /

ErrorDocument 300 /error.php

You can change the error.php to whatever you want. Just have to ensure that you keep the relative paths the same. IE:

/ = root path /error/ = root path/error

Probably not the answer your looking for, but may give you a start.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜