帝国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}&amp;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&amp;ph=1&amp;tempid=12&amp;line=42&amp;rjfl={R:1}&amp;orderby=newstime"/>
</rule>
<rule name="soft1_rewrite">
<match url="^soft/(.*)-1-0-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=7&amp;ph=1&amp;tempid=12&amp;line=42&amp;rjfl={R:1}&amp;orderby=onclick"/>
</rule>
<rule name="soft2_rewrite">
<match url="^soft/(.*)-2-0-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=7&amp;ph=1&amp;tempid=12&amp;line=42&amp;rjfl={R:1}&amp;isgood=1"/>
</rule>
<rule name="game_rewrite">
<match url="^game/(.*)-(.*)-0-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=6&amp;ph=1&amp;tempid=11&amp;line=42&amp;wllx={R:1}&amp;yxfl={R:2}&amp;orderby=newstime"/>
</rule>
<rule name="game1_rewrite">
<match url="^game/(.*)-(.*)-1-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=6&amp;ph=1&amp;tempid=11&amp;line=42&amp;wllx={R:1}&amp;yxfl={R:2}&amp;orderby=onclick"/>
</rule>
<rule name="game2_rewrite">
<match url="^game/(.*)-(.*)-2-0-0"/>
<action type="Rewrite" url="/e/action/ListInfo.php?classid=6&amp;ph=1&amp;tempid=11&amp;line=42&amp;wllx={R:1}&amp;yxfl={R:2}&amp;isgood=1"/>
&amp;
</rule>
</rules>
复制代码
猜你需要

豫ICP备2021026617号-1  豫公网安备:41172602000185   Copyright © 2021-2028 www.78moban.com/ All Rights Reserved

本站作品均来自互联网,转载目的在于传递更多信息,并不代表本站赞同其观点和对其真实性负责。如有侵犯您的版权,请联系 1565229909#qq.com(把#改成@),我们将立即处理。