一、检查服务器是否支持rewrite
例如本地开启rewrite方法如下:
Apache 配置文件 httpd.conf
1、
LoadModule rewrite_module modules/mod_rewrite.so
把这句的“#”注释掉。
2、
AllowOverride none
改为
AllowOverride all
3、重启apache服务器。
二、准备.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
三、PHPCMS V9后台设置分类栏目。
位置:内容->管理栏目->添加栏目
注意设置第二选项卡,“生成HTML设置”
栏目页URL规则:list-1-2-1.html
内容页URL规则:content-1-2-1.html
四、批量更新URL,完成伪静态设置。
相关文章教程推荐:phpcms教程
The above is the detailed content of phpcms full site pseudo-static settings. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Atom editor mac version download
The most popular open source editor

SublimeText3 Chinese version
Chinese version, very easy to use

WebStorm Mac version
Useful JavaScript development tools

Dreamweaver Mac version
Visual web development tools
