今天爱分享给大家带来帝国cms 设置URL伪静态的方法【图文详解】,希望能够帮助到大家。
学过seo的朋友都应该知道,动态的url链接对搜索引擎排名非常不利,下面介绍一下帝国cms网站如何设置url伪静态。
1.栏目设置为动态访问
修改单个栏目属性,如下图

批量修改栏目属性,如下图:

2.网站首页伪静态设置

3.网站伪静态参数的设置

4.网站信息页地址更新

设置好url打开是404,因为没有设置服务器伪静态规则
如果服务器是装的宝塔控制面板只需要后台一键设置就可以了,如下图所示:

规则如下:
Nginx伪静态规则:
location / {
rewrite ^([^\.]*)/listinfo-([0-9]+)-([0-9]+)\.html$ $1/e/action/ListInfo/index.php?classid=$2&page=$3 last;
rewrite ^([^\.]*)/showinfo-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4 last;
rewrite ^([^\.]*)/infotype-([0-9]+)-([0-9]+)\.html$ $1/e/action/InfoType/index.php?ttid=$2&page=$3 last;
rewrite ^([^\.]*)/tags-(.+?)-([0-9]+)\.html$ $1/e/tags/index.php?tagname=$2&page=$3 last;
if (!-e $request_filename) {
return 404;
}
}
修改完配置文件,需要重启nginx生效。
Apache伪静态规则
RewriteEngine On
ErrorDo喂饭ent 404 /404.html
Rewritebase /
#信息列表
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^listinfo-(.+?)-(.+?)\.html$ /e/action/ListInfo/index\.php\?classid=$1&page=$2
#信息内容页
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^showinfo-(.+?)-(.+?)-(.+?)\.html$ /e/action/ShowInfo\.php\?classid=$1&id=$2&page=$3
#标题分类列表页
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^infotype-(.+?)-(.+?)\.html$ /e/action/InfoType/index\.php\?ttid=$1&page=$2
#TAGS信息列表页
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tags-(.+?)-(.+?)\.html$ /e/tags/index\.php\?tagname=$1&page=$2
#评论列表页
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)\.html$ /e/pl/index\.php\?doaction=$1&classid=$2&id=$3&page=$4&myorder=$5&tempid=$6
如果大家还有问题,可以咨询qq:349464923 有偿白嫖勿扰(备注:建站问题咨询)
原文链接:http://blog.itblood.com/723.html,转载请注明出处。

![色情手机 STEAM官方中文步兵版 V1.1.236+DLC [SLG/PC/官中]](/wp-content/uploads/replace/2025/07/18/e57c34f1e23cc72deff68db9c16a9948.webp)