您的位置:首页 > 编程语言 > PHP开发

宝塔界面phpcms除了首页其他页面404

2020-07-19 04:37 274 查看

**

宝塔界面## phpcms****除了首页其他页面404

**
99.9% 是伪静态的原因,
1 打开宝塔 点击网站域名 点击伪静态
2 如果还是不行
有可能是 宝塔版本 不同导致的, 新版和旧版是有所区别的
版本6 以下的伪静态:

RewriteEngine On
RewriteBase /
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

版本6 以上的伪静态

location / {
###以下为PHPCMS 伪静态化rewrite法则
rewrite ^/(.*)content-([0-9]+)-([0-9]+)-([0-9]+)\.html  /index.php?m=content&c=index&a=show&catid=$2&id=$3&page=$4;
rewrite ^/(.*)show-([0-9]+)-([0-9]+)-([0-9]+).html  /index.php?m=content&c=index&a=show&catid=$2&id=$3&page=$4;
rewrite ^/(.*)list-([0-9]+)-([0-9]+).html  /index.php?m=content&c=index&a=lists&catid=$2&page=$3;
}

3 如果以上都不行
教你最直接的全搞定
使用宝塔 一键部署
登陆宝塔界面,点击软件商店,点击一键部署,找到phpcms

全搞定,这样即使你不设置 伪静态都是可以的。
希望对大家有帮助,

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: