阿里云服务器广告

web.config做http的301重定向到https及不带www的域名做301重定向到带www的域名

作者:南国老符 分类:知识技术 浏览:311 日期:2021-06-06 来源:建站管家


这个是老站点df82.com的web.config的伪静态及301重定向代码(包括内页死链的301重定向),

发上来备忘,主要是网站改版时,产生大量的死链,如果有简洁的写法再改进,等收录正常后,再去掉


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="towww" stopProcessing="true">
                    <match url="(.*)" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAny">
                        <add input="{HTTP_HOST}" pattern="^df8s\.com$" />
                    </conditions>
                    <action type="Redirect" url="https://www.df8s.com/{R:0}" redirectType="Permanent" />
                </rule>
                <rule name="tohttps" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{HTTP_FROM_HTTPS}" pattern="^on$" negate="true" />
                    </conditions>
                    <action type="Redirect" url="https://www.df8s.com/{R:1}" redirectType="Permanent" />
                </rule>
                <rule name="page301" stopProcessing="true">
                    <match url="^cn/guoqingcuxiao-n250.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/cloudhost/" />
                </rule>
                <rule name="page302" stopProcessing="true">
                    <match url="^tag/gongsiwangzhanjianshe/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/sites/" />
                </rule>
                <rule name="page303" stopProcessing="true">
                    <match url="^cn/baidubianjiqidivbiaoqian-n211.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/sites/allsites.asp" />
                </rule>
                <rule name="page304" stopProcessing="true">
                    <match url="^danzhou/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/sites/shop.asp" />
                </rule>
                <rule name="page305" stopProcessing="true">
                    <match url="^cn/news-n305.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/sites/mobile.asp" />
                </rule>
                <rule name="page306" stopProcessing="true">
                    <match url="^cn/licaiwangzhan-c292.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/sites/weifx.asp" />
                </rule>
                <rule name="page307" stopProcessing="true">
                    <match url="^cn/news-n205.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/customercenter/" />
                </rule>
                <rule name="page308" stopProcessing="true">
                    <match url="^cn/news-n256.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/mail/" />
                </rule>
                <rule name="page309" stopProcessing="true">
                    <match url="^cn/seorumenjiaocheng-n269.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/domain/" />
                </rule>
                <rule name="page310" stopProcessing="true">
                    <match url="^cn/aspmianfeikaiyuanjianzhanxitong-n234.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/" />
                </rule>
                <rule name="page311" stopProcessing="true">
                    <match url="^cn/javascriptyibudiaoyong-n302.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/miniprogram/" />
                </rule>
                <rule name="page312" stopProcessing="true">
                    <match url="^tag/shenwangzhanjianshegongzuoshi/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/ssl/" />
                </rule>
                <rule name="page313" stopProcessing="true">
                    <match url="^tag/bangongzidonghuaguanlixitong/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/Cloudhost.asp" />
                </rule>
                <rule name="page314" stopProcessing="true">
                    <match url="^cn/fangdichanwangzhanjianshe-c242.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/" appendQueryString="false" />
                </rule>
                <rule name="page315" stopProcessing="true">
                    <match url="^cn/jiazhengfuwugongsiwangzhan-c229.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/" appendQueryString="false" />
                </rule>
                <rule name="page316" stopProcessing="true">
                    <match url="^cn/zuoliuliangdefangfa-n280.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/twhost.asp" />
                </rule>
                <rule name="page317" stopProcessing="true">
                    <match url="^cn/jiazhuanggongsiwangzhanjianshe-c240.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/usa.asp" appendQueryString="false" />
                </rule>
                <rule name="page318" stopProcessing="true">
                    <match url="^cn/shimumenyewangzhan-c306.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/linux_host.asp" appendQueryString="false" />
                </rule>
                <rule name="page319" stopProcessing="true">
                    <match url="^tag/qiyewangzhanzhizuo/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/java.asp" />
                </rule>
                <rule name="page320" stopProcessing="true">
                    <match url="^tag/haikouwangzhanjianshe/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/basic.asp" />
                </rule>
                <rule name="page321" stopProcessing="true">
                    <match url="^cn/chajuwangzhan-c259.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/twolinevhost.asp" appendQueryString="false" />
                </rule>
                <rule name="page322" stopProcessing="true">
                    <match url="^cn/shipinwangzhan-c256.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/hostlist.asp" appendQueryString="false" />
                </rule>
                <rule name="page323" stopProcessing="true">
                    <match url="^cn/tianpinwangzhansheji-c257.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/hkhost.asp" appendQueryString="false" />
                </rule>
                <rule name="page324" stopProcessing="true">
                    <match url="^cn/maoyiwangzhanjianshe-c297.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/asp_net.asp" appendQueryString="false" />
                </rule>
                <rule name="page325" stopProcessing="true">
                    <match url="^cn/huanbao-c285.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/superg.asp" />
                </rule>
                <rule name="page326" stopProcessing="true">
                    <match url="^beijing/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/database.asp" />
                </rule>
                <rule name="page327" stopProcessing="true">
                    <match url="^tag/sanyazuowangzhan/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/customercenter/productprice.asp" />
                </rule>
                <rule name="page328" stopProcessing="true">
                    <match url="^cn/shipinwangzhan-c256.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/" />
                </rule>
                <rule name="page329" stopProcessing="true">
                    <match url="^huaqiangbei/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/twhost.asp" />
                </rule>
                <rule name="page330" stopProcessing="true">
                    <match url="^shatoujiao/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/usa.asp" />
                </rule>
                <rule name="page331" stopProcessing="true">
                    <match url="^baoting/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/linux_host.asp" />
                </rule>
                <rule name="page332" stopProcessing="true">
                    <match url="^cn/huanbao-c286.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/" />
                </rule>
                <rule name="page333" stopProcessing="true">
                    <match url="^luohu/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/cloudhost/" />
                </rule>
                <rule name="page334" stopProcessing="true">
                    <match url="^cn/anfangjiankong-c267.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/domain/" />
                </rule>
                <rule name="page335" stopProcessing="true">
                    <match url="^cn/baojianpinwangzhansheji-c303.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/mail/" />
                </rule>
                <rule name="page336" stopProcessing="true">
                    <match url="^cn/mysqlcuowu-n300.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/sites/" />
                </rule>
                <rule name="page337" stopProcessing="true">
                    <match url="^kunming/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/miniprogram/" />
                </rule>
                <rule name="page338" stopProcessing="true">
                    <match url="^cn/news-n206.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/ssl/" />
                </rule>
                <rule name="page339" stopProcessing="true">
                    <match url="^hefei/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/Cloudhost.asp" />
                </rule>
                <rule name="page340" stopProcessing="true">
                    <match url="^tag/qiyewangzhansheji/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/trademark/" />
                </rule>
                <rule name="page341" stopProcessing="true">
                    <match url="^tag/mianfeijianzhanxitong/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/sites/" />
                </rule>
                <rule name="page342" stopProcessing="true">
                    <match url="^cn/jianzhanguanjiajiyuthinkphp-n310.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/reg/" />
                </rule>
                <rule name="page343" stopProcessing="true">
                    <match url="^tag/haikouzuowangzhan/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/reg/forget.asp" />
                </rule>
                <rule name="page344" stopProcessing="true">
                    <match url="^cn/chongwu-c58-1.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/" />
                </rule>
                <rule name="page345" stopProcessing="true">
                    <match url="^aomen/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/2j.asp?id=2" />
                </rule>
                <rule name="page346" stopProcessing="true">
                    <match url="^bantian/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/2j.asp?id=3" />
                </rule>
                <rule name="page347" stopProcessing="true">
                    <match url="^xixiang/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/2j.asp?id=4" />
                </rule>
                <rule name="page348" stopProcessing="true">
                    <match url="^cn/waimaowangzhan-c299.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/2j.asp?id=5" />
                </rule>
                <rule name="page349" stopProcessing="true">
                    <match url="^qiongzhong/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/2j.asp?id=11" />
                </rule>
                <rule name="page350" stopProcessing="true">
                    <match url="^shenzhen/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/2j.asp?id=13" />
                </rule>
                <rule name="page351" stopProcessing="true">
                    <match url="^songgang/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/2j.asp?id=15" />
                </rule>
                <rule name="page352" stopProcessing="true">
                    <match url="^cn/flvshipinbofangdaima-n229.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=323" />
                </rule>
                <rule name="page353" stopProcessing="true">
                    <match url="^tag/weixinxiaochengxukaifa/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=320" />
                </rule>
                <rule name="page354" stopProcessing="true">
                    <match url="^cn/jiudianwangzhan-c272.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=243" />
                </rule>
                <rule name="page355" stopProcessing="true">
                    <match url="^cn/zhuangxiuwangzhansheji-c239.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=362" />
                </rule>
                <rule name="page356" stopProcessing="true">
                    <match url="^cn/seoruhegengxinwenzhang-n255.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/services/webhosting/" />
                </rule>
                <rule name="page357" stopProcessing="true">
                    <match url="^cn/shengwuyiyaowangzhan-c301.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=257" />
                </rule>
                <rule name="page358" stopProcessing="true">
                    <match url="^cn/gongzhonghaokaifa-n290.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=231" />
                </rule>
                <rule name="page359" stopProcessing="true">
                    <match url="^cn/news-n256.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=226" />
                </rule>
                <rule name="page360" stopProcessing="true">
                    <match url="^cn/qiyeyouxiang-a26.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=144" />
                </rule>
                <rule name="page361" stopProcessing="true">
                    <match url="^cn/zuowangzhansuoxuziliao-n252.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=77" />
                </rule>
                <rule name="page362" stopProcessing="true">
                    <match url="^cn/chayewangzhanzhizuo-c238.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=68" />
                </rule>
                <rule name="page363" stopProcessing="true">
                    <match url="^cn/baojianpinwangzhan-c304.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=66" />
                </rule>
                <rule name="page364" stopProcessing="true">
                    <match url="^cn/wangzhanweihutuiguang-a23.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=59" />
                </rule>
                <rule name="page365" stopProcessing="true">
                    <match url="^cn/sheying-c271.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=22" />
                </rule>
                <rule name="page366" stopProcessing="true">
                    <match url="^hangzhou/" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=18" />
                </rule>
                <rule name="page367" stopProcessing="true">
                    <match url="^cn/wangzhansuduman-n278.html" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/faq/list.asp?unid=81" />
                </rule>
  &n

期待您打赏鼓励
支付宝打赏二维码
支付宝扫码
微信打赏二维码
微信扫码

上一篇:wordpress添加友情链接的方法

下一篇:SuperSlide横向滚动不完整的bug解决方法

发表评论
您需要登录后才可以评论 登 录 | 注册
评论 (0)
QQ客服
客服微信
加QQ群