帝国CMS7.5自定义伪静态插件{SEO栏目优化利器}[支持7.0,7.2]
时间:2024年04月24日
/来源:网络
/编辑:佚名
帝国CMS自定义伪静态插件{SEO栏目优化利器}[支持7.0,7.2]
本文关键字词:自定义伪静态,栏目目录伪静态,内容目录伪静态,帝国cms伪静态,SEO栏目优化
实现栏目目录伪静态,比如news/china/69_1.html 是伪静态实现的,而不是生成静态的。纯绿色不影响帝国原有伪静态、静态和动态等功能设置。
1:栏目要选静态 不生成
2:内容页存放目录–栏目目录,内容页目录存放形式–不设置目录,(有利SEO,方便匹配栏目ID)
3:内容页文件命名形式 不能是目录,但是支持信息文件名的修改,URL也能很好看
4:栏目目录和信息文件名是英文或数字(栏目目录建议英文或英文开头,“-_”上下划线留着给别的东西用吧避免冲突如其它伪静态,避免冲突)
********为了通用只能遵守上述要求,有这些特殊需求自己改去*********
在列表页使用分页号(后缀为.html的)
<?= (int)substr($_GET['page'], 6) && (int)substr($_GET['page'], 6) != 1 ? '第 [!--list.pageno--] 页' : ''?>
在内容页使用分页标题:
<?= (int)str_replace('_', '', $_GET['page']) && (int)str_replace('_', '', $_GET['page']) != 1 ? '[!--p.title--]' : '[!--pagetitle--]'?>
栏目设置截图:


添加伪静态规则
伪静态规则
#栏目
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/)
RewriteRule ^([0-9a-zA-Z/]+)/(|index\.html|index_[0-9]+\.html)$ /e/action/list\.php\?classid=$1&page=$2
#内容
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/)
RewriteRule ^([0-9a-zA-Z/]+)/([0-9a-zA-Z]+)([_0-9]*)\.html$ /e/action/show\.php\?classid=$1&id=$2&page=$3
NGNIX:
location ~* /e/admin/|/sys-static/{
break;
}
location ~* {
rewrite ^/showinfo-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/action/ShowInfo.php?classid=$1&id=$2&page=$3 last;
rewrite ^/listinfo-([0-9]+)-([0-9]+).html$ /e/action/ListInfo/index.php?classid=$1&page=$2 last;
rewrite ^/infotype-([0-9]+)-([0-9]+).html$ /e/action/InfoType/index.php?ttid=$1&page=$2 last;
rewrite ^/tags-(.+?)-([0-9]+).html$ /e/tags/index.php?tagname=$1&page=$2 last;
rewrite ^/comment-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/pl/index.php?doaction=$1&classid=$2&id=$3&page=$4&myorder=$5&tempid=$6 last;
rewrite ^/([0-9a-zA-Z-/]+)/(|index.html|index_[0-9]+.html)$ /e/action/list.php?classid=$1&page=$2 last;
rewrite ^/([0-9a-zA-Z-/]+)/([0-9a-zA-Z]+)([_0-9]*).html$ /e/action/show.php?classid=$1&id=$2&page=$3 last;
}
【SEO栏目优化利器】帝国CMS自定义伪静态插件[支持7.0,7.2]
链接: https://pan.baidu.com/s/1qrAOXiqXOtF5WcoB6EaDzQ 提取码: v5c6
本文关键字词:自定义伪静态,栏目目录伪静态,内容目录伪静态,帝国cms伪静态,SEO栏目优化
实现栏目目录伪静态,比如news/china/69_1.html 是伪静态实现的,而不是生成静态的。纯绿色不影响帝国原有伪静态、静态和动态等功能设置。
1:栏目要选静态 不生成
2:内容页存放目录–栏目目录,内容页目录存放形式–不设置目录,(有利SEO,方便匹配栏目ID)
3:内容页文件命名形式 不能是目录,但是支持信息文件名的修改,URL也能很好看
4:栏目目录和信息文件名是英文或数字(栏目目录建议英文或英文开头,“-_”上下划线留着给别的东西用吧避免冲突如其它伪静态,避免冲突)
********为了通用只能遵守上述要求,有这些特殊需求自己改去*********
在列表页使用分页号(后缀为.html的)
<?= (int)substr($_GET['page'], 6) && (int)substr($_GET['page'], 6) != 1 ? '第 [!--list.pageno--] 页' : ''?>
在内容页使用分页标题:
<?= (int)str_replace('_', '', $_GET['page']) && (int)str_replace('_', '', $_GET['page']) != 1 ? '[!--p.title--]' : '[!--pagetitle--]'?>
栏目设置截图:


添加伪静态规则
伪静态规则
#栏目
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/)
RewriteRule ^([0-9a-zA-Z/]+)/(|index\.html|index_[0-9]+\.html)$ /e/action/list\.php\?classid=$1&page=$2
#内容
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/)
RewriteRule ^([0-9a-zA-Z/]+)/([0-9a-zA-Z]+)([_0-9]*)\.html$ /e/action/show\.php\?classid=$1&id=$2&page=$3
NGNIX:
location ~* /e/admin/|/sys-static/{
break;
}
location ~* {
rewrite ^/showinfo-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/action/ShowInfo.php?classid=$1&id=$2&page=$3 last;
rewrite ^/listinfo-([0-9]+)-([0-9]+).html$ /e/action/ListInfo/index.php?classid=$1&page=$2 last;
rewrite ^/infotype-([0-9]+)-([0-9]+).html$ /e/action/InfoType/index.php?ttid=$1&page=$2 last;
rewrite ^/tags-(.+?)-([0-9]+).html$ /e/tags/index.php?tagname=$1&page=$2 last;
rewrite ^/comment-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/pl/index.php?doaction=$1&classid=$2&id=$3&page=$4&myorder=$5&tempid=$6 last;
rewrite ^/([0-9a-zA-Z-/]+)/(|index.html|index_[0-9]+.html)$ /e/action/list.php?classid=$1&page=$2 last;
rewrite ^/([0-9a-zA-Z-/]+)/([0-9a-zA-Z]+)([_0-9]*).html$ /e/action/show.php?classid=$1&id=$2&page=$3 last;
}
【SEO栏目优化利器】帝国CMS自定义伪静态插件[支持7.0,7.2]
链接: https://pan.baidu.com/s/1qrAOXiqXOtF5WcoB6EaDzQ 提取码: v5c6
新闻资讯 更多
- 【帝国cms教程】帝国CMS7.5自定义伪静态插件{SEO栏目优化利器}[支持7.0,7.2]04-24
- 【帝国cms教程】帝国cms7.5PHP调用复选框的值并且判断值为1时显示什么值为2时显示什么值为空显示什么04-24
- 【帝国cms教程】帝国CMS内容页调用当前栏目链接方法04-24
- 【帝国cms教程】帝国cms7.5内容页调用图集输出游戏截图04-24
- 【帝国cms教程】帝国CMS模板灵动标签调用标题含有栏目名称的相关文章信息04-24
- 【帝国cms教程】帝国cms封面模板调用当前栏目下的子栏目名称及子栏目下的信息展示/二级分类04-24
- 【帝国cms教程】帝国cms修改列表分页默认index及url的方法04-24
- 【帝国cms教程】帝国cms内容页随机调用站点搜索关键词以及搜索关键字统计(和tag一样)灵动方法!04-24
热门文章
- 178Moban源码谈谈免费源码与收费源码的区别
- 2帝国CMS忘记后台登陆用户名、密码、认证码的解决方法
- 3帝国CMS(EmpireCMS) v7.5后台任意代码执行漏洞及具体修复方法
- 4帝国CMS和WordPress 哪个好?哪个适合建站?
- 5如何解决Discuz的密码错误次数过多请15分钟后登陆的问题
- 6帝国cms灵动标签取得内容和栏目链接地址
- 7emlog pro 注册码“开心”教程(如果有一天,emlog官方版 或者 emlog免费版 跑路了,那用户怎么办?)
- 8帝国cms后台登录出现”您还未登录”怎么解决?
- 9织梦CMS在nginx下设置伪静态方法(附nginx伪静态规则)
- 10帝国cms7.5忘记登录密码 和忘记登录认证码以及多次登录 失败被锁定解决办法