[不花钱站长]:从免费域名开始[0元] Oracle永久免费VPS[0元] VPS环境搭建免费脚本[0元] 秒变大盘挂载免费网盘[0元] 小白免费采集器1天500W[0元] CF免费DNS+CDN服务[0元]
[零基础网赚]:撸本站免费源码[0元] 网站强引免费蜘蛛法[0元] 图片视频文件免费存储[0元] 外链轻松发布免费友链[0元] 入坑免费教程学习源代码[0元] 网上百种+赚钱联盟推荐[?元]

↑↑主机测评网牛逼个人站长零成本从白嫖到精通指南↑↑


您现在的位置是:首页 > 全球[VPS测评] >  帝国CMS伪静态,便宜VPS,国外永久免费VPS

帝国CMS程序Apache/IIS7/Nginx环境下的伪静态规则

全球[VPS测评]来源:主机测评网2022-12-25点击:627
【性价之王】【线路之王】【价格之王】【配置之王】
【免费之王】【香港首推】【梯子之王】【独服之王】
帝国CMS程序Apache/IIS7/Nginx环境下的伪静态规则

我们常用的中大型内容网站系统中,帝国CMS可能说是安全性和稳定性比较好的,DEDECMS程序虽然当初比较流行,但是也经常出现漏洞安全。相反帝国CMS的更新频率以及安全性还是被行内较为看好的,虽然在易用性上比DEDECMS稍微不是特别习惯,但是认真使用还是可以的。

蜗牛记忆中(曾经用过),帝国CMS是可以生成静态的,对于伪静态忘记是否有支持,反正在找类似的文章时候看到帝国CMS可以设置伪静态,那就是说伪静态是支持的,这里先把几个常用的Apache/IIS7/Nginx环境下的伪静态规则整理出来,以备以后需要的时候直接使用。

第一、Nginx

rewrite ^([^\\.]*)/listinfo-(.+?)-(.+?)\\.html$ $1/e/action/ListInfo/index.php?classid=$2&page=$3 last;
rewrite ^([^\\.]*)/showinfo-(.+?)-(.+?)-(.+?)\\.html$ $1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4 last;
rewrite ^([^\\.]*)/infotype-(.+?)-(.+?)\\.html$ $1/e/action/InfoType/index.php?ttid=$2&page=$3 last;
rewrite ^([^\\.]*)/tags-(.+?)-(.+?)\\.html$ $1/e/tags/index.php?tagname=$2&page=$3 last;
rewrite ^([^\\.]*)/comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)\\.html$ $1/e/pl/index\\.php\\?doaction=$2&classid=$3&id=$4&page=$5&myorder=$6&tempid=$7 last;
if (!-e $request_filename) {
return 404;
}

第二、Apache

RewriteEngine On
ErrorDocument 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

第三、IIS7

<?xml version=\”1.0\” encoding=\”UTF-8\”?>
<configuration>
<system.webServer>
<!–帝国7.2默认规则 IIS7的rule name不能重复相同–>
<rewrite>
<rules>
<rule name=\”listinfo\”>
<match url=\”^(.*/)*listinfo-(.+?)-(.+?).html\\?*(.*)$\” />
<action type=\”Rewrite\” url=\”{R:1}/e/action/ListInfo/index.php\\?classid={R:2}&amp;page={R:3}\” />
</rule>
<rule name=\”showinfo\”>
<match url=\”^(.*/)*showinfo-(.+?)-(.+?)-(.+?).html\\?*(.*)$\” />
<action type=\”Rewrite\” url=\”{R:1}/e/action/ShowInfo.php\\?classid={R:2}&amp;id={R:3}&amp;page={R:4}\” />
</rule>
<rule name=\”infotype\”>
<match url=\”^(.*/)*infotype-(.+?)-(.+?).html\\?*(.*)$\” />
<action type=\”Rewrite\” url=\”{R:1}/e/action/InfoType/index.php\\?ttid={R:2}&amp;page={R:3}\” />
</rule>
<rule name=\”tags\”>
<match url=\”^(.*/)*tags-(.+?)-(.+?).html\\?*(.*)$\” />
<action type=\”Rewrite\” url=\”{R:1}/e/tags/index.php\\?tagname={R:2}&amp;page={R:3}\” />
</rule>
<rule name=\”comment\”>
<match url=\”^(.*/)*comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?).html\\?*(.*)$\” />
<action type=\”Rewrite\” url=\”{R:1}/e/pl/index.php\\?doaction={R:2}&amp;={R:3}&amp;={R:4}&amp;page={R:5}&amp;myorder={R:6}&amp;tempid={R:7}\” />
</rule>
</rules>
</rewrite>
</system.webServer> &nbsp;
</configuration>

一般我们使用Nginx和Apache环境较多。


[帝国CMS伪静态]历史优惠活动内容
  • 帝国CMS程序Apache/IIS7/Nginx环境下的伪静态规则2022-12-29
  • 帝国CMS程序Apache/IIS7/Nginx环境下的伪静态规则2022-12-25

  • 猜你可能想看的VPS


    转载请注明原文地址:http://www.motoll.com/read-39528.html

    使用该VPS服务器的演示站:

    下一篇       上一篇