1、反省效劳器能否支持rewrite
例如内陆开启rewrite办法以下:
Apache 设置装备摆设文件 httpd.conf
一、
LoadModule rewrite_module modules/mod_rewrite.so
把这句的“#”正文掉。
二、
AllowOverride none
改成
AllowOverride all
三、重启apache效劳器。
2、预备.htaccess文件(若何建设. htaccess )
若是windows,能够应用记事本,保留抉择另存为,".htaccess" ,留意定名时要加之"",失去.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
以上的是.htaccess规定。
要是想正在内陆测试,例如 127.0.0.1/my2400,由于没有是根目次拜访,以是把以上代码改写以下(多了个/my2400):
RewriteEngine On RewriteRule ^(.*)content-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/my2400/index\.php\?m=content&c=index&a=show&catid= $2&id= $3&page=$4 RewriteRule ^(.*)show-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/my2400/index\.php\?m=content&c=index&a=show&catid=$2&id= $3&page=$4 RewriteRule ^(.*)list-([0-9]+)-([0-9]+).html$ $1/my2400/index\.php\?m=content&c=index&a=lists&catid=$2&page=$3
3、PHPCMS V9后盾设置分类栏目。
地位:内容->治理栏目->增加栏目
留意设置第二选项卡,“天生HTML设置”
栏目页URL规定:list-1-2-1.html
内容页URL规定:content-1-2-1.html
4、批量更新URL,实现伪动态设置。
相干文章教程保举:phpcms教程
以上就是phpcms全站伪动态设置的具体内容,更多请存眷资源魔其它相干文章!
标签: 伪静态 phpcms phpcms教程 phpcms技巧 php问题解决 设置 全站
版权声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。
抱歉,评论功能暂时关闭!