欢迎光临
我们一直在努力

PHPCMS V9在Apache、Nginx、IIS各个web服务器下的Rewrite伪静态规则[2014年6月14日更新nginx规则]

在看完PHPCMS V9静态化HTML生成设置及URL规则优化之后,发现有不少朋友在搜索寻找Phpcms V9在Apache、Nginx、IIS伪静态规则,于是搜集分享在此!

PHPCMS V9 伪静态规则 for Apache:

RewriteEngine on
RewriteBase / //如果安装在子目录需要制定RewriteBase
RewriteRule ^content_([0-9]+)_([0-9]+)_([0-9]+).html index.php?m=content&c=index&a=show&catid=1&id=2&page=3
RewriteRule ^announce_([0-9]+).html index.php?m=announce&c=index&a=show&aid=
1
RewriteRule ^link.html index.php?m=link
RewriteRule ^link_type_([0-9,a-z]*).html index.php?m=link&c=index&a=list_type&type_id=1&siteid=2
RewriteRule ^rss.html index.php?m=content&c=rss&siteid=1
RewriteRule ^tag_([0-9,a-z]*)_(.*).html index.php?m=content&c=tag&catid=
1&tag=2
RewriteRule ^special.html index.php?m=special&c=index&a=special&siteid=
1
RewriteRule ^special_([0-9,a-z]*).html index.php?m=special&c=index&id=1
RewriteRule ^special_([0-9,a-z]*)_([0-9,a-z]*).html index.php?m=special&c=index&a=type&specialid=
1&typeid=$2

PHPCMS V9在Rewrite伪静态Nginx规则【2014年6月14日更新规则】:

location / {
if (!-f request_filename){
rewrite (.*) /index.php;
}
rewrite ^/caipu-([0-9]+)-([0-9]+)-([0-9]+).html /index.php?m=content&c=index&a=show&catid=
1&id=2&page=3 last;
rewrite ^/content-([0-9]+)-([0-9]+)-([0-9]+).html /index.php?m=content&c=index&a=show&catid=1&id=2&page=3 last;
rewrite ^/list-([0-9]+)-([0-9]+).html /index.php?m=content&c=index&a=lists&catid=
1&page=2 last;
rewrite ^/tags/([^\.]*)-([0-9]+).html /index.php?m=content&c=tag&a=lists&tag=
1&page=3 last;
rewrite ^/comment-([0-9]+)-([0-9]+)-([0-9]+).html /index.php?m=comment&c=index&a=init&commentid=content_
1-2-3 last;
rewrite ^/([^\.]*).html /index.php?m=member&c=index&a=$1 last;
}

<strong>相关热词搜索:</strong>{loop keywordskeyword}<a href="{APP_PATH}tags/{urlencode(keyword)}-1.html" target="_blank" class="blue">{keyword}</a>{/loop}

PHPCMS V9伪静态规则 win下IIS完美设置:

新建一个记事本文件,将文件名改为:httpd.ini。再将以下代码粘贴进去:

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteEngine on
RewriteRule ^(.*)content-([0-9]+)-([0-9]+)-([0-9]+)\.html1/index\.php\?m=content&c=index&a=show&catid=2&id=3&page=4
RewriteRule ^(.*)show-([0-9]+)-([0-9]+)-([0-9]+).html
1/index\.php\?m=content&c=index&a=show&catid=2&id=3&page=4
RewriteRule ^(.*)list-([0-9]+)-([0-9]+).html1/index\.php\?m=content&c=index&a=lists&catid=2&page=3

PHPCMS V9分类信息列表页在IIS6 伪静态规则:

RewriteRule /list-(d+)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*).html /index.php?m=content&c=index&a=lists&catid=1&city=2&agent=3&bedroom=4&objecttype=5&pay_type_int=6&price=7&rent_mode=8&zone=9&page=10

赞(0)
未经允许不得转载:飘云 » PHPCMS V9在Apache、Nginx、IIS各个web服务器下的Rewrite伪静态规则[2014年6月14日更新nginx规则]
分享到: 更多 (0)