Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[已解决] Windows 2008R2 IIS7.5 Rewrite伪静态规则方法(二)

[复制链接]
Peker 发表于 2010-2-4 11:43:09 | 显示全部楼层 |阅读模式
本帖最后由 Peker 于 2011-9-15 11:27 编辑

方法很简单。直接修改论坛根目录下的web.config文件

web.config文件覆盖就行了:


  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3.     <system.webServer>

  4. <rewrite>
  5.             <rules>
  6.                 <rule name="Imported Rule 17">
  7.                     <match url="^archiver/((fid|tid)-[\w\-]+\.html)$" ignoreCase="false" />
  8.                     <action type="Rewrite" url="archiver/index.php?{R:1}" appendQueryString="false" />
  9.                 </rule>
  10.                 <rule name="Imported Rule 18">
  11.                     <match url="^forum-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
  12.                     <action type="Rewrite" url="forumdisplay.php?fid={R:1}&amp;page={R:2}" appendQueryString="false" />
  13.                 </rule>
  14.                 <rule name="Imported Rule 19">
  15.                     <match url="^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
  16.                     <action type="Rewrite" url="viewthread.php?tid={R:1}&amp;extra=page\%3D{R:3}&amp;page={R:2}" appendQueryString="false" />
  17.                 </rule>
  18.                 <rule name="Imported Rule 20">
  19.                     <match url="^space-(username|uid)-(.+)\.html$" ignoreCase="false" />
  20.                     <action type="Rewrite" url="space.php?{R:1}={R:2}" appendQueryString="false" />
  21.                 </rule>
  22.                 <rule name="Imported Rule 21">
  23.                     <match url="^tag-(.+)\.html$" ignoreCase="false" />
  24.                     <action type="Rewrite" url="tag.php?name={R:1}" appendQueryString="false" />
  25.                 </rule>
  26.             </rules>
  27.         </rewrite>
  28.         <defaultDocument>
  29.             <files>
  30.                 <clear />
  31.                 <add value="index.php" />
  32.                 <add value="Default.htm" />
  33.                 <add value="Default.asp" />
  34.                 <add value="index.htm" />
  35.                 <add value="index.html" />
  36.                 <add value="iisstart.htm" />
  37.                 <add value="default.aspx" />
  38.             </files>
  39.         </defaultDocument>
  40.     </system.webServer>
  41. </configuration>
复制代码




Windows 2008R2 IIS7.5 Rewrite伪静态规则方法(一)

Windows server 2008R2 IIS7.5 Rewrite伪静态规则方法(三)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
svsv 发表于 2010-2-7 18:57:45 | 显示全部楼层
這個好方法,高手
回复

使用道具 举报

saintlu 发表于 2010-2-19 14:22:34 | 显示全部楼层
收藏了。  的
回复

使用道具 举报

hnqdgyj 发表于 2010-2-24 16:57:00 | 显示全部楼层
实施就知道了
回复

使用道具 举报

暗夜网事 发表于 2010-3-2 19:00:41 | 显示全部楼层
500错误  首页也打不开了
回复

使用道具 举报

a123123 发表于 2010-10-27 23:38:44 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

a123123 发表于 2010-10-27 23:39:00 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-5-18 16:25 , Processed in 0.102779 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表