艾时利(楼主) 1

问下我的IIS6伪静态规则哪里不对吗。

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^"^/(\d+)/index_(\d+).html$" category.php?cid=$1&page=$2
RewriteRule ^"^/\w+/(\d+).html$" article.php?id=$1
RewriteRule ^"^/\w+/(\d+)_(\d+).html$" article.php?id=$1&p=$2
RewriteRule ^"^/user$" public/api.php?app=user
RewriteRule ^"^/user/home$" public/api.php?app=user&do=home
RewriteRule ^"^/user/manage/(\w+)$" public/api.php?app=user&do=manage&pg=$1
RewriteRule ^"^/user/manage$" public/api.php?app=user&do=manage
RewriteRule ^"^/user/publish$" public/api.php?app=user&do=manage&pg=publish
RewriteRule ^"^/user/article$" public/api.php?app=user&do=manage&pg=article
RewriteRule ^"^/user/category$" public/api.php?app=user&do=manage&pg=category
RewriteRule ^"^/user/comment$" public/api.php?app=user&do=manage&pg=comment
RewriteRule ^"^/user/inbox/(\d+)$" public/api.php?app=user&do=manage&pg=inbox&user=$1
RewriteRule ^"^/user/inbox$" public/api.php?app=user&do=manage&pg=inbox
RewriteRule ^"^/user/profile/(\w+)$" public/api.php?app=user&do=profile&pg=$1
RewriteRule ^"^/user/profile$" public/api.php?app=user&do=profile
RewriteRule ^"^/user/login/(\w+)$" public/api.php?app=user&do=login&sign=$1
RewriteRule ^"^/user/login$" public/api.php?app=user&do=login
RewriteRule ^"^/user/register$" public/api.php?app=user&do=register
RewriteRule ^"^/user/logout$" public/api.php?app=user&do=logout
RewriteRule ^"^/user/findpwd$" public/api.php?app=user&do=findpwd
RewriteRule ^"^/user/(\d+)/(\w+)/$" public/api.php?app=user&do=$2&uid=$1
RewriteRule ^"^/user/(\d+)/$" public/api.php?app=user&do=home&uid=$1
RewriteRule ^"^/user/(\d+)/(\d+)/$" public/api.php?app=user&do=home&uid=$1&cid=$2
RewriteRule ^"^/user/(\d+)/favorite/(\d+)/$" public/api.php?app=user&do=favorite&uid=$1&id=$2
RewriteRule ^"^/api$" public/api.php
RewriteRule ^"^/comment$" public/api.php?app=comment
RewriteRule ^"^/search$" public/api.php?app=search
RewriteRule ^"^/public/(\w+)$" public/api.php?app=public&do=$1
RewriteRule ^"^/favorite$" public/api.php?app=favorite
RewriteRule ^"^/favorite/(\d+)/$" public/api.php?app=favorite&id=$1
RewriteRule ^"^/forms$" public/api.php?app=forms
RewriteRule ^"^/forms/(\w+)$" public/api.php?app=forms&do=$1
RewriteRule ^"^/forms/(\d+)/$" public/api.php?app=forms&id=$1
RewriteRule ^"^/tag/(\d+)(/|/index\.html)$" tag.php?id=$1
RewriteRule ^"^/tag/(\d+)/index_(\d+).html$" tag.php?id=$1&page=$2
RewriteRule ^"^/tag/(\w+)(/|/index\.html)$" tag.php?tkey=$1
RewriteRule ^"^/tag/(\w+)/index_(\d+).html$" tag.php?tkey=$1&page=$2
RewriteRule ^"^/tag/(.+)(/|/index\.html)$" tag.php?name=$1
RewriteRule ^"^/tag/(.+)/index_(\d+).html$" tag.php?name=$1&page=$2
艾时利(楼主) 2

这个是我的IIS6的规则,为什么文章的列表页和新闻页面不行的啊?

发布于 2017-09-23 16:59 1 回复 举报
艾时利(楼主) 3

快要给这个伪静态搞疯掉了

发布于 2017-09-23 17:25 0 回复 举报
iCMSdev 4

RewriteRule 是apache的伪静态规则吧

发布于 2017-09-23 22:10 0 回复 举报
艾时利(楼主) 5

RewriteRule没有错的啊,我是写在httpd.ini里面的。而且我查看了下 DZBBS,wordpress在IIS6里面的伪静态也是这样写的啊。

发布于 2017-09-24 13:02 0 回复 举报
艾时利(楼主) 6

真的搞死了。把数据转到2008上去 ,IIS7.5开伪静态还是不想 500错误。

                    官方什么时候IIS 的伪静态能出啊?
发布于 2017-09-28 16:06 0 回复 举报
iCMSdev 7

@艾时利 我找个环境测试下吧!! 从来没用过IIS

发布于 2017-09-29 01:53 0 回复 举报
艾时利(楼主) 8

对照着DOCS,一点一点的改了。现在栏目,文章内容的伪静态都OK了。

但是标签的怎么搞都不行。

<rule name="已导入的规则 7" stopProcessing="true">
<match url="^tag/(\d+)$" ignoreCase="false" />
<action type="Rewrite" url="tag.php?id={R:1}" appendQueryString="false" />
</rule>
<rule name="已导入的规则 8" stopProcessing="true">
<match url="^tag/(\d+)/index.html$" ignoreCase="false" />
<action type="Rewrite" url="tag.php?id={R:1}" appendQueryString="false" />
</rule>
<rule name="已导入的规则 9" stopProcessing="true">
<match url="^tag/(\d+)/index_(\d+).html$" ignoreCase="false" />
<action type="Rewrite" url="tag.php?id={R:1}&page={R:2}" appendQueryString="false" />
</rule>
</rules>

发布于 2017-09-29 10:06 0 回复 举报
验证码 换一张
取 消