A-A+

phpCMS 各种类型伪静态规则

2015年02月27日 Phpcms 暂无评论 阅读 355 次浏览 次
 
PHPCMS该软件采用模块化开发,支持多种分类方式,使用它可方便实现个性化网站的设计、开发与维护。它支持众多的程序组合,可轻松实现网站平台迁移,并可广泛满足各种规模的网站需求,可靠性高,是一款具备文章、下载、图片、分类信息、影视、商城、采集、财务等众多功能的强大、易用、可扩展的优秀网站管理软件。
 
###PHPCMS 伪静态化rewrite规则
 
rewrite ^(.*)show-([0-9]+)-([0-9]+)\.html$ $1/show.php?itemid=$2&page=$3;
 
rewrite ^(.*)list-([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$2&page=$3;
 
rewrite ^(.*)show-([0-9]+)\.html$ $1/show.php?specialid=$2;
 
###apache,PHPCMS伪静态的设置方法:
Apache 配置文件 httpd.conf
1、LoadModule rewrite_module modules/mod_rewrite.so 
把这句的“#”注释掉。
2、AllowOverride none 改为 AllowOverride all
重启apache服务器。
第二步:详细设置:
①在根目录上上传名为 .htaccess 的文件,如果里面请在里面增加相应代码; 代码如下:
RewriteEngine On
RewriteRule ^(.*)content-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/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]+).html$ $1/index\.php\?m=content&c=index&a=lists&catid=$2&page=$3
第三步:进入PHPCMS后台设置:
①位置:内容-->管理栏目-->生成HTML项目
栏目页URL规则:list-1-2-1.html
内容页URL规则:content-1-2-1.html
第四步:批量更新URL:
①位置:内容-->批量更新URL
②更新缓存

评论已关闭!

Copyright © 香港虚拟主机_美国虚拟主机_香港服务器_美国服务器租用托管 保留所有权利.   Theme  Ality 蜀ICP备14006632号-1

用户登录