IIS7的伪静态配置文件web.config 20
我有一个程序,需要在IIS7下实现伪静态,IIS7下我查阅了相关资料,确认已经可以实现的是DISCUZ,在根目录下编译了web.config文件。但我使用的程序不是Dis...
我有一个程序,需要在IIS7下实现伪静态,IIS7下我查阅了相关资料,确认已经可以实现的是DISCUZ,在根目录下编译了web.config文件。
但我使用的程序不是Discuz,是Emlog,目前官方并无IIS7上这类伪静态规则,请高手根据DISCUZ成功的模式编写一个Emlog的web.config 谢谢,我现在吧DISCUZ的格式发出来,以及EMLOG的IIS6上的实现模式,
<?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>
------------
Emlom 现用iis 6的伪静态规则如下
------------
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^(.*)/(post|record|sort|author|page)/([0-9]+)$ $1/index.php\?$2=$3
RewriteRule ^(.*)/tag/(.+)$ $1/index.php\?tag=$2
RewriteRule ^(.*)/(post|record|sort|author|page)-([0-9]+)\.html$ $1/index.php\?$2=$3
RewriteRule ^(.*)/tag-(.+)\.html$ $1/index.php\?tag=$2 展开
但我使用的程序不是Discuz,是Emlog,目前官方并无IIS7上这类伪静态规则,请高手根据DISCUZ成功的模式编写一个Emlog的web.config 谢谢,我现在吧DISCUZ的格式发出来,以及EMLOG的IIS6上的实现模式,
<?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>
------------
Emlom 现用iis 6的伪静态规则如下
------------
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^(.*)/(post|record|sort|author|page)/([0-9]+)$ $1/index.php\?$2=$3
RewriteRule ^(.*)/tag/(.+)$ $1/index.php\?tag=$2
RewriteRule ^(.*)/(post|record|sort|author|page)-([0-9]+)\.html$ $1/index.php\?$2=$3
RewriteRule ^(.*)/tag-(.+)\.html$ $1/index.php\?tag=$2 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询