您现在的位置是:首页 > cms教程 > 帝国CMS教程帝国CMS教程
帝国cms伪静态7.2规则不同环境下apache\IIS6\IIS7\Nginx方法
煜风2023-01-31帝国CMS教程已有人查阅
导读帝国cms7.2伪静态规则apacheIIS6IIS7Nginx方法,apache下的.htaccess:IIS6下的httpd.ini:IIS7下的web.config:Nginx下伪静态:

帝国cms7.2伪静态规则apacheIIS6IIS7Nginx方法
apache下的.htaccess:
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
IIS6下的httpd.ini:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
#信息列表
RewriteRule ^(.*)listinfo-(.+?)-(.+?).html$ $1/e/action/ListInfo/index.php?classid=$2&page=$3
#信息内容页
RewriteRule ^(.*)showinfo-(.+?)-(.+?)-(.+?).html$ $1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4
#标题分类列表页
RewriteRule ^(.*)infotype-(.+?)-(.+?).html$ $1/e/action/InfoType/index.php?ttid=$2&page=$3
#TAGS信息列表页
RewriteRule ^(.*)tags-(.+?)-(.+?).html$ $1/e/tags/index.php?tagname=$2&page=$3
#评论列表页
RewriteRule ^(.*)comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?).html$$1/e/pl/index.php?doaction=$2&classid=$3&id=$4&page=$5&myorder=$6&tempid=$7
#搜索伪静态
IIS7下的web.config:
<?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}&page={R:3}" />
</rule>
<rule name="showinfo">
<match url="^(.*/)*showinfo-(.+?)-(.+?)-(.+?).html?*(.*)$" />
<action type="Rewrite" url="{R:1}/e/action/ShowInfo.php?classid={R:2}&id={R:3}&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}&page={R:3}" />
</rule>
<rule name="tags">
<match url="^(.*/)*tags-(.+?)-(.+?).html?*(.*)$" />
<action type="Rewrite" url="{R:1}/e/tags/index.php?tagname={R:2}&page={R:3}" />
</rule>
<rule name="comment">
<match url="^(.*/)*comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?).html?*(.*)$" />
<action type="Rewrite" url="{R:1}/e/pl/index.php?doaction={R:2}&={R:3}&={R:4}&page={R:5}&myorder={R:6}&tempid={R:7}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
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;
}
很赞哦! ()
相关教程
图文教程
帝国CMS内容页怎么获取当前栏目ID和父栏目ID
帝国CMS内容页获取当前内容的所属栏目ID及父栏目ID
帝国CMS用newstext字段作简介的方法
我们都知道帝国CMS有专用的自动简介字段[!--smalltext--],但有时的[!--smalltext--]字段使用的非常少,单独加一个[!--smalltext--]字段感觉太浪费资源。
帝国CMS分类信息怎么设定有效期的方法
分类信息,通常要设定有效期,如:此信息还剩N天 。等等。且大家都在找如何让有效期能根据判断实际,显示天数和是否过期。下面我在分享一下具体操作(我会尽量用最详细的说明)
帝国cms商城优惠码phome_enewsshop_precode数据表Ctrl+G查询
下面是帝国cms商城优惠码phome_enewsshop_precode数据表字段名和类型说明Ctrl+G查询
相关源码
-
响应式高端家居家具装修类pbootcms模板网站源码家居装修、空间设计企业打造的营销型网站解决方案,基于PbootCMS内核深度开发。采用前沿响应式架构,适配手机端与PC端浏览体验查看源码 -
自适应极简风个人博客文章自媒体网站模板基于PbootCMS开源内核开发的极简个人博客模板,采用移动优先设计原则,通过Media Query技术实现320px至1920px六级分辨率适配,确保在手机、平板及PC设备上均呈现良好的视觉体验。查看源码 -
(PC+WAP)压缩机离心风机红色机械设备营销型网站pbootcms模板基于PbootCMS开发的压缩机/离心风机专用模板,助力机械设备企业构建高效营销平台;模板可编辑压缩机参数表、风机性能曲线等专业展示模块查看源码 -
(PC+WAP)院校学院职业学校机构协会网站开源源码下载本模板基于PbootCMS系统开发,为高等院校、职业学校等教育机构设计,特别适合展示学校概况、院系设置、招生信息等内容。采用双端适配技术,确保在PC和移动设备上都能获得良好的浏览体验。查看源码 -
(自适应响应式)高新技术科技能源pbootcms网站HTML5模板本模板基于PbootCMS内核开发,为高新技术、科技研发、能源技术等科技型企业设计。采用HTML5+CSS3前沿技术,具备完善的响应式布局,能够自动适配手机、平板和电脑等多种终端设备。模板设计风格简约大气查看源码 -
(自适应HTML5)响应式智能设备人工智能机器pbootcms源码免费下载这款基于PbootCMS开发的网站模板为人工智能和智能设备行业设计,采用现代化科技风格,突出产品的智能特性和技术创新。模板架构合理,功能完善,能够有效展示各类智能产品的核心功能和解决方案。查看源码
| 分享笔记 (共有 篇笔记) |

