linux服务器下使用.htaccess。windows服务器下使用web.config(虚拟主机iis7)。费了很大劲才搞定,有需要的朋友可以下载。
下载链接:
https://download.csdn.net/download/qq_39161501/10376553
下载后将对应的文件放在网站根目录,phpcms后台要修改成如下图所示url规则:
修改后,依次更新,然后清除缓存。url伪静态完成
宝塔伪静态设置
location / {
###以下为PHPCMS 伪静态化rewrite法则
rewrite ^(.*)show-([0-9]+)-([0-9]+)\.html$ $1/show.php?itemid=$2&page=$3;
rewrite ^(.*)show-([0-9]+)\.html$ $1/show.php?specialid=$2;
####以下为PHPWind 伪静态化rewrite法则
rewrite ^(.*)list-([0-9]+)-([0-9]+)\.html$ $1/index.php?m=content&c=index&a=lists&catid=$2&page=$3;
rewrite ^(.*)show-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/index.php?m=content&c=index&a=show&catid=$2&id=$3;
}