2008R2设置404不起作用
没有设置404,随便打开一个页面就是乱码
如果设置了404,显示的也是一样都是乱码
麻烦大神们看看,谢谢了!
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="portal_article">
<match url="^(.*/)*article-([0-9]+)-([0-9]+).html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/portal.php\?mod=view&aid={R:2}&page={R:3}&{R:4}" />
</rule>
<rule name="forum_forumdisplay">
<match url="^(.*/)*forum-(\w+)-([0-9]+).html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/forum.php\?mod=forumdisplay&fid={R:2}&page={R:3}&{R:4}" />
</rule>
<rule name="forum_viewthread">
<match url="^(.*/)*thread-([0-9]+)-([0-9]+)-([0-9]+).html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/forum.php\?mod=viewthread&tid={R:2}&extra=page%3D{R:4}&page={R:3}&{R:5}" />
</rule>
<rule name="group_group">
<match url="^(.*/)*group-([0-9]+)-([0-9]+).html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/forum.php\?mod=group&fid={R:2}&page={R:3}&{R:4}" />
</rule>
<rule name="home_space">
<match url="^(.*/)*space-(username|uid)-(.+).html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/home.php\?mod=space&{R:2}={R:3}&{R:4}" />
</rule>
</rules>
</rewrite>
<defaultDocument>
<files>
<clear />
<add value="default.php" />
<add value="index.htm" />
<add value="index.html" />
<add value="index.php" />
</files>
</defaultDocument>
<httpErrors errorMode="DetailedLocalOnly">
<remove statusCode="500" subStatusCode="-1" />
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="500" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="500.htm" responseMode="File" />
</httpErrors>
<staticContent>
<mimeMap fileExtension=".apk" mimeType="application/vnd.android.package-archive" />
</staticContent>
</system.webServer>
<system.web>
<customErrors>
<error redirect="http://www.xxxxxxx.com/404/404.htm" statusCode="404" />
</customErrors>
</system.web>
</configuration>
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。