【phpcms如何设置伪静态页面】phpcms如何设置伪静态

更新时间:2019-05-09    来源:WordPress    手机版     字体:

【www.bbyears.com--WordPress】

那么phpcms如何设置伪静态?

wordpress等其他程序设置伪静态一样。采用程序路由控制,或者htcaccess写重写规则。

phpcms可以采取htcaccess写重写规则,如:

 代码如下

RewriteEngine on
RewriteRule ^content-([0-9]+)-([0-9]+)-([0-9]+).html index.php?m=content&c=index&a=show&catid=$1&id=$2&page=$3
RewriteRule ^show-([0-9]+)-([0-9]+)-([0-9]+).html index.php?m=content&c=index&a=show&catid=$1&id=$2&page=$3
RewriteRule ^list-([0-9]+)-([0-9]+).html index.php?m=content&c=index&a=lists&catid=$1&page=$2

只需上传htcaccess重写规则文件到www根目录就行了。

这样访问www.xxx.com/show-1-1-1.html就是rewite到了www.111cn.net /index.php?
m=content&c=index&a=show&catid=1&id=1&page=1了,访问动态网址也可以访问。

本文来源:http://www.bbyears.com/wangyezhizuo/50138.html