Dedecms 5.5 伪静态化 ReWrite 规则设置
1. 简介
伪静态化(Rewrite)是网站SEO优化中常用的一种技术,可以将动态的URL转换为静态的URL,有利于搜索引擎抓取和用户访问,DedeCMS 5.5 支持使用 Apache 和 IIS 服务器进行伪静态化设置。
2. Apache 服务器配置
2.1 安装 mod_rewrite 模块
确保 Apache 服务器已安装 mod_rewrite 模块。
2.2 编辑 .htaccess 文件
在网站根目录下创建或编辑.htaccess
文件,添加以下 ReWrite 规则:
RewriteEngine On
以下是 Dedecms 5.5 常用伪静态规则
1. 文章列表伪静态
RewriteRule ^lists(d+)(d+).html$ index.php?mod=content&show=lists&id=$1&totalpage=$2 [L]
2. 文章内容伪静态
RewriteRule ^content(d+)(d+)(d+).html$ index.php?mod=content&show=content&id=$1&cid=$2&aid=$3 [L]
3. 标签页伪静态
RewriteRule ^tags(d+).html$ index.php?mod=content&show=tags&id=$1 [L]
4. 留言板伪静态
RewriteRule ^guestbook(d+)(d+).html$ index.php?mod=guestbook&show=guestbook&pagesize=$1&page=$2 [L]
5. 图集列表伪静态
RewriteRule ^album(d+)(d+).html$ index.php?mod=content&show=album&id=$1&totalpage=$2 [L]
6. 图集内容伪静态
RewriteRule ^albumview(d+)(d+)(d+).html$ index.php?mod=content&show=albumview&id=$1&pid=$2&aid=$3 [L]
7. 分类信息列表伪静态
RewriteRule ^info(d+)(d+).html$ index.php?mod=info&show=info&id=$1&totalpage=$2 [L]
8. 分类信息内容伪静态
RewriteRule ^infopic(d+)(d+)(d+).html$ index.php?mod=info&show=infopic&id=$1&pid=$2&aid=$3 [L]
9. 产品列表伪静态
RewriteRule ^product(d+)(d+).html$ index.php?mod=product&show=product&id=$1&totalpage=$2 [L]
10. 产品内容伪静态
RewriteRule ^productview(d+)(d+)(d+).html$ index.php?mod=product&show=productview&id=$1&cid=$2&aid=$3 [L]
11. 下载列表伪静态
RewriteRule ^download(d+)(d+).html$ index.php?mod=download&show=download&id=$1&totalpage=$2 [L]
12. 下载内容伪静态
RewriteRule ^downview(d+)(d+)(d+).html$ index.php?mod=download&show=downview&id=$1&cid=$2&aid=$3 [L]
13. 图册列表伪静态
RewriteRule ^soft(d+)(d+).html$ index.php?mod=soft&show=soft&id=$1&totalpage=$2 [L]
14. 图册内容伪静态
RewriteRule ^softview(d+)(d+)(d+).html$ index.php?mod=soft&show=softview&id=$1&pid=$2&aid=$3 [L]
15. 链接列表伪静态
RewriteRule ^link(d+)(d+).html$ index.php?mod=link&show=link&id=$1&totalpage=$2 [L]
16. 链接内容伪静态
RewriteRule ^linkview(d+)(d+)(d+).html$ index.php?mod=link&show=linkview&id=$1&pid=$2&aid=$3 [L]
17. 会员空间伪静态
RewriteRule ^space(d+)(d+).html$ index.php?mod=member&show=space&uid=$1&page=$2 [L]
18. 会员空间内容伪静态
RewriteRule ^spaceview(d+)(d+)(d+).html$ index.php?mod=member&show=spaceview&uid=$1&pid=$2&aid=$3 [L]
19. 搜索结果伪静态
RewriteRule ^search(d+)(d+)(d+)(d+)(d+).html$ index.php?mod=search&show=search&keyword=$1&total=$2&page=$3&size=$4&ord=$5 [L]
20. 图片搜索结果伪静态
RewriteRule ^picsearch(d+)(d+)(d+)(d+)(d+).html$ index.php?mod=picsearch&show=picsearch&keyword=$1&total=$2&page=$3&size=$4&ord=$5 [L]
21. 专题列表伪静态
RewriteRule ^special(d+)(d+).html$ index.php?mod=special&show=special&id=$1&totalpage=$2 [L]
22. 专题内容伪静态
RewriteRule ^specialview(d+)(d+)(d+).html$ index.php?mod=special&show=specialview&id=$1&pid=$2&aid=$3 [L]
23. 资讯列表伪静态
RewriteRule ^news(d+)(d+).html$ index.php?mod=news&show=news&id=$1&totalpage=$2 [L]
24. 资讯内容伪静态
RewriteRule ^newsview(d+)(d+)(d+).html$ index.php?mod=news&show=newsview&id=$1&cid=$2&aid=$3 [L]
25. 单页内容伪静态
RewriteRule ^page(d+)(d+).html$ index.php?mod=page&show=page&id=$1&totalpage=$2 [L]
26. 文件列表伪静态
RewriteRule ^file(d+)(d+).html$ index.php?mod=file&show=file&id=$1&totalpage=$2 [L]
27. 文件内容伪静态
RewriteRule ^fileview(d+)(d+)(d+).html$ index.php?mod=file&show=fileview&id=$1&pid=$2&aid=$3 [L]
28. 投票列表伪静态
RewriteRule ^vote(d+)(d+).html$ index.php?mod=vote&show=vote&id=$1&totalpage=$2 [L]
29. 投票内容伪静态
RewriteRule ^voteview(d+)(d+)(d+).html$ index.php?mod=vote&show=voteview&id=$1&pid=$2&aid=$3 [L]
30. 优惠券列表伪静态
RewriteRule ^coupons(d+)(d+).html$ index.php?mod=coupons&show=coupons&id=$1&totalpage=$2 [L]
31. 优惠券内容伪静态
RewriteRule ^couponsview(d+)(d+)(d+).html$ index.php?mod=coupons&show=couponsview&id=$1&pid=$2&aid=$3 [L]
32. 在线预约列表伪静态
RewriteRule ^reserve(d+)(d+).html$ index.php?mod=reserve&show=reserve&id=$1&totalpage=$2 [L]
33. 在线预约内容伪静态
RewriteRule ^reserveview(d+)(d+)(d+).html$ index.php?mod=reserve&show=reserveview&id=$1&pid=$2&aid=$3 [L]
34. 问卷调查列表伪静态
RewriteRule ^voteform(d+)(d+).html$ index.php?mod=voteform&show=voteform&id=$1&totalpage=$2 [L]
35. 问卷调查内容伪静态
RewriteRule ^voteformview(d+)(d+)(d+).html$ index.php
原创文章,作者:未希,如若转载,请注明出处:https://www.kdun.com/ask/1149706.html
本网站发布或转载的文章及图片均来自网络,其原创性以及文中表达的观点和判断不代表本网站。如有问题,请联系客服处理。
发表回复