[提问]
帮忙加一下404页面web.config
|
|
web.config里有DZ7.2的伪静态规则,在这里面再加一个404指定到一个页面,怎么加都出错,谁帮忙加一下,谢谢。- <?xml version="1.0" encoding="UTF-8"?>
- <configuration>
- <system.webServer>
- <rewrite>
- <rules>
- <rule name="Imported Rule 17">
- <match url="^archiver/((fid|tid)-[\w\-]+\.html)$" ignoreCase="false" />
- <action type="Rewrite" url="archiver/index.php?{R:1}" appendQueryString="false" />
- </rule>
- <rule name="Imported Rule 18">
- <match url="^forum-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
- <action type="Rewrite" url="forumdisplay.php?fid={R:1}&page={R:2}" appendQueryString="false" />
- </rule>
- <rule name="Imported Rule 19">
- <match url="^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
- <action type="Rewrite" url="viewthread.php?tid={R:1}&extra=page\%3D{R:3}&page={R:2}" appendQueryString="false" />
- </rule>
- <rule name="Imported Rule 20">
- <match url="^space-(username|uid)-(.+)\.html$" ignoreCase="false" />
- <action type="Rewrite" url="space.php?{R:1}={R:2}" appendQueryString="false" />
- </rule>
- <rule name="Imported Rule 21">
- <match url="^tag-(.+)\.html$" ignoreCase="false" />
- <action type="Rewrite" url="tag.php?name={R:1}" appendQueryString="false" />
- </rule>
- </rules>
- </rewrite>
- <httpErrors errorMode="Detailed" />
- <asp scriptErrorSentToBrowser="true" />
- </system.webServer>
- <system.web>
- <customErrors mode="Off" />
- <globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" />
- </system.web>
- </configuration>
复制代码 |
|
|
|
|
|
|
|
|
|
|
nojay
发表于 2010-8-24 10:16:57
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2010-8-24 10:22:35
|
显示全部楼层
<customErrors mode="On" default Redirect="mycustompage.htm"/>
把上面<customErrors mode="Off" />删除,添加上面的 |
|
|
|
|
|
|
|
|
|
|
nojay
发表于 2010-8-24 10:47:03
|
显示全部楼层
是这样吗
- <?xml version="1.0" encoding="UTF-8"?>
- <configuration>
- <system.webServer>
- <rewrite>
- <rules>
- <rule name="Imported Rule 17">
- <match url="^archiver/((fid|tid)-[\w\-]+\.html)$" ignoreCase="false" />
- <action type="Rewrite" url="archiver/index.php?{R:1}" appendQueryString="false" />
- </rule>
- <rule name="Imported Rule 18">
- <match url="^forum-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
- <action type="Rewrite" url="forumdisplay.php?fid={R:1}&page={R:2}" appendQueryString="false" />
- </rule>
- <rule name="Imported Rule 19">
- <match url="^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
- <action type="Rewrite" url="viewthread.php?tid={R:1}&extra=page\%3D{R:3}&page={R:2}" appendQueryString="false" />
- </rule>
- <rule name="Imported Rule 20">
- <match url="^space-(username|uid)-(.+)\.html$" ignoreCase="false" />
- <action type="Rewrite" url="space.php?{R:1}={R:2}" appendQueryString="false" />
- </rule>
- <rule name="Imported Rule 21">
- <match url="^tag-(.+)\.html$" ignoreCase="false" />
- <action type="Rewrite" url="tag.php?name={R:1}" appendQueryString="false" />
- </rule>
- </rules>
- </rewrite>
- <httpErrors errorMode="Detailed" />
- <asp scriptErrorSentToBrowser="true" />
- </system.webServer>
- <system.web>
- <customErrors mode="On" default Redirect="mycustompage.htm"/>
- <globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" />
- </system.web>
- </configuration>
复制代码 |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2010-8-24 10:59:12
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
nojay
发表于 2010-8-24 11:11:20
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
kmxmxy
发表于 2010-10-19 20:42:00
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2010-10-20 09:54:09
|
显示全部楼层
- <?xml version="1.0" encoding="UTF-8"?>
- <configuration>
- <system.web>
- <customErrors mode="On" default Redirect="mycustompage.htm"/>
- </system.web>
- </configuration>
复制代码 mycustompage.htm根据你的实际情况替换 |
|
|
|
|
|
|
|
|
|
|
sctongyi
发表于 2011-2-28 23:06:02
|
显示全部楼层
|
好像替换了还是不行哦 会出现500错误 win主机 |
|
|
|
|
|
|
|
|
|
|
wq4553
发表于 2011-3-2 09:13:52
|
显示全部楼层
|
好像替换了还是不行哦 会出现500错误 win主机 |
|
|
|
|
|
|
|
|