帝国CMS:Nginx伪静态规则转写为IIS伪静态规则
时间:2023年07月05日
/来源:网络
/编辑:佚名
实例说明:
使用帝国CMS建站,因站点迁移,由Nginx环境,转为IIS,Windows服务器,也同样采用宝塔面板操作。
点击站点 设置>>>伪静态,复制以下规则到当前项空白框,保存即可。

环境说明:
服务器:Windows 2012R2
IIS版本:8.5
宝塔版本:7.5免费版
PHP版本:5.6
MySqL:5.5.62
SQLserver:2005(共存环境)
帝国版本:7.5开源版
注意事项:
// 1.注意,IIS伪静态规则,动态链接&符号,需要使用转义字符& ,否则无效;
// 2.动态链接,一旦有某个参数不存在,例如分页,在数据不足以分页的时候,会导致动态链接失效,以致于无法保存伪静态规则;
// 2.案例来源,无忧模板,原使用Apache,后转为Nginx,再转为IIS,规则之间转换,参照以下各个类别写法;(2022-03-14)
IIS伪静态写法:
复制代码
<?xml version="1.0" ?>
<rules>
<rule name="Tag_rewrite">
<match url="^tag/([0-9]+).html"/>
<action type="Rewrite" url="e/tags/?tagid={R:1}"/>
</rule>
<rule name="tagname_rewrite">
<match url="^tags/(.*)"/>
<action type="Rewrite" url="e/tags/?tagname={R:1}"/>
</rule>
<rule name="sitemapRules_rewrite">
<match url="^sitemaps.xml"/>
<action type="Rewrite" url="/site.php"/>
</rule>
<rule name="sitemapRules1_rewrite">
<match url="^sitemaps/sitemap_(.*).xml"/>
<action type="Rewrite" url="/site.php?classid={R:1}"/>
</rule>
<rule name="sitemapRules2_rewrite">
<match url="^sitemaps/sitemap_(.*)_(.*).xml"/>
<action type="Rewrite" url="/site.php?classid={R:1}&page={R:2}"/>
</rule>
<rule name="soft_rewrite">
<match url="^soft/(.*)-0-0-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=7&ph=1&tempid=12&line=42&rjfl={R:1}&orderby=newstime"/>
</rule>
<rule name="soft1_rewrite">
<match url="^soft/(.*)-1-0-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=7&ph=1&tempid=12&line=42&rjfl={R:1}&orderby=onclick"/>
</rule>
<rule name="soft2_rewrite">
<match url="^soft/(.*)-2-0-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=7&ph=1&tempid=12&line=42&rjfl={R:1}&isgood=1"/>
</rule>
<rule name="game_rewrite">
<match url="^game/(.*)-(.*)-0-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=6&ph=1&tempid=11&line=42&wllx={R:1}&yxfl={R:2}&orderby=newstime"/>
</rule>
<rule name="game1_rewrite">
<match url="^game/(.*)-(.*)-1-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=6&ph=1&tempid=11&line=42&wllx={R:1}&yxfl={R:2}&orderby=onclick"/>
</rule>
<rule name="game2_rewrite">
<match url="^game/(.*)-(.*)-2-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=6&ph=1&tempid=11&line=42&wllx={R:1}&yxfl={R:2}&isgood=1"/>
&
</rule>
</rules>
复制代码
使用帝国CMS建站,因站点迁移,由Nginx环境,转为IIS,Windows服务器,也同样采用宝塔面板操作。
点击站点 设置>>>伪静态,复制以下规则到当前项空白框,保存即可。

环境说明:
服务器:Windows 2012R2
IIS版本:8.5
宝塔版本:7.5免费版
PHP版本:5.6
MySqL:5.5.62
SQLserver:2005(共存环境)
帝国版本:7.5开源版
注意事项:
// 1.注意,IIS伪静态规则,动态链接&符号,需要使用转义字符& ,否则无效;
// 2.动态链接,一旦有某个参数不存在,例如分页,在数据不足以分页的时候,会导致动态链接失效,以致于无法保存伪静态规则;
// 2.案例来源,无忧模板,原使用Apache,后转为Nginx,再转为IIS,规则之间转换,参照以下各个类别写法;(2022-03-14)
IIS伪静态写法:
复制代码
<?xml version="1.0" ?>
<rules>
<rule name="Tag_rewrite">
<match url="^tag/([0-9]+).html"/>
<action type="Rewrite" url="e/tags/?tagid={R:1}"/>
</rule>
<rule name="tagname_rewrite">
<match url="^tags/(.*)"/>
<action type="Rewrite" url="e/tags/?tagname={R:1}"/>
</rule>
<rule name="sitemapRules_rewrite">
<match url="^sitemaps.xml"/>
<action type="Rewrite" url="/site.php"/>
</rule>
<rule name="sitemapRules1_rewrite">
<match url="^sitemaps/sitemap_(.*).xml"/>
<action type="Rewrite" url="/site.php?classid={R:1}"/>
</rule>
<rule name="sitemapRules2_rewrite">
<match url="^sitemaps/sitemap_(.*)_(.*).xml"/>
<action type="Rewrite" url="/site.php?classid={R:1}&page={R:2}"/>
</rule>
<rule name="soft_rewrite">
<match url="^soft/(.*)-0-0-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=7&ph=1&tempid=12&line=42&rjfl={R:1}&orderby=newstime"/>
</rule>
<rule name="soft1_rewrite">
<match url="^soft/(.*)-1-0-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=7&ph=1&tempid=12&line=42&rjfl={R:1}&orderby=onclick"/>
</rule>
<rule name="soft2_rewrite">
<match url="^soft/(.*)-2-0-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=7&ph=1&tempid=12&line=42&rjfl={R:1}&isgood=1"/>
</rule>
<rule name="game_rewrite">
<match url="^game/(.*)-(.*)-0-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=6&ph=1&tempid=11&line=42&wllx={R:1}&yxfl={R:2}&orderby=newstime"/>
</rule>
<rule name="game1_rewrite">
<match url="^game/(.*)-(.*)-1-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=6&ph=1&tempid=11&line=42&wllx={R:1}&yxfl={R:2}&orderby=onclick"/>
</rule>
<rule name="game2_rewrite">
<match url="^game/(.*)-(.*)-2-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=6&ph=1&tempid=11&line=42&wllx={R:1}&yxfl={R:2}&isgood=1"/>
&
</rule>
</rules>
复制代码
新闻资讯 更多
- 【帝国cms教程】帝国CMS模板变量$GLOBALS[navclassid]用法分析04-03
- 【帝国cms教程】鲜为人知帝国CMS内容页调用上一篇和下一篇的精华方法汇总04-03
- 【帝国cms教程】怎么快速找出帝国CMS数据库配置文件路径及迁移网站后修改技巧!04-03
- 【帝国cms教程】帝国CMS模板$GLOBALS[navclassid]用法详解04-03
- 【帝国cms教程】帝国cms 7.5版列表页分页样式修改笔记04-02
- 【帝国cms教程】解决帝国CMS搜索页面模板不支持灵动标签和万能标签的方法04-02
- 【帝国cms教程】帝国CMS只备份栏目和模板的方法04-02
- 【帝国cms教程】帝国CMS怎样删除清空数据库记录?04-02
热门文章
- 178Moban源码谈谈免费源码与收费源码的区别
- 2帝国CMS忘记后台登陆用户名、密码、认证码的解决方法
- 3帝国CMS(EmpireCMS) v7.5后台任意代码执行漏洞及具体修复方法
- 4帝国CMS和WordPress 哪个好?哪个适合建站?
- 5如何解决Discuz的密码错误次数过多请15分钟后登陆的问题
- 6帝国cms灵动标签取得内容和栏目链接地址
- 7emlog pro 注册码“开心”教程(如果有一天,emlog官方版 或者 emlog免费版 跑路了,那用户怎么办?)
- 8织梦CMS在nginx下设置伪静态方法(附nginx伪静态规则)
- 9帝国cms后台登录出现”您还未登录”怎么解决?
- 10帝国cms7.5忘记登录密码 和忘记登录认证码以及多次登录 失败被锁定解决办法