您现在的位置是:首页 > cms教程 > 帝国CMS教程帝国CMS教程

帝国cms伪静态7.2规则不同环境下apache\IIS6\IIS7\Nginx方法

煜风2023-01-31帝国CMS教程已有38人查阅

导读帝国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}&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>
</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;
}

本文标签:

很赞哦! (1)

暂无内容
暂无内容

相关教程

暂无内容
暂无内容

相关源码

  • (自适应响应式)html5文章资讯新闻博客pbootcms网站模板下载本模板基于PbootCMS系统开发,为新闻资讯、博客类网站设计,特别适合各类文章内容的发布与管理。采用响应式技术,确保在不同设备上都能获得良好的阅读体验。查看源码
  • (自适应)pbootcms家政服务保洁保姆打扫卫生网站模板下载本模板基于PbootCMS内核开发,为家政服务企业量身定制。设计风格温馨亲切,突出家政行业的专业与贴心服务特性,多方位展示企业服务项目与优势。查看源码
  • (自适应响应式)瓷砖大理石装修建材类网站pbootcms模板html5模板本模板基于PbootCMS开发,针对瓷砖、大理石等建材行业特点进行优化设计。采用响应式布局技术,确保产品展示效果在不同设备上都能合理呈现。模板特别强化了石材纹理的视觉表现力,帮助建材企业更好地展示产品质感。查看源码
  • (自适应)品牌策划高端设计公司网站pbootcms模板免费下载本模板为品牌策划与设计公司打造,基于PbootCMS内核开发,充分考虑了创意设计行业的视觉展示需求。模板设计风格现代简约,布局合理清晰,呈现设计作品与专业服务,帮助设计公司展示创意实力并吸引潜在客户。查看源码
  • (自适应)简繁双语机械矿山矿石五金设备pbootcms源码下载本模板基于PbootCMS开发,主要面向机械五金、矿山矿石设备等行业,支持简体中文和繁体中文双语切换。采用响应式布局技术,确保在各种设备上都能获得良好的浏览体验。模板设计注重展示工业设备的专业性和技术特点,帮助企业建立可靠的线上展示平台。查看源码
  • (自适应)双语网络电子摄像头设备pbootcms网站模板下载核心功能定位:基于PbootCMS开发的双语摄像头企业官网模板,深度适配产品规格书展示、实时监控演示、解决方案呈现等业务场景,支持中英文内容一键切换。查看源码
分享笔记 (共有 0 篇笔记)
昵称:
匿名发表 登录账号
         
验证码:
    暂无内容
    暂无内容

相关标签

    暂无内容