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

南国老符 南国老符 最后更新于:2021-06-06 浏览:4818

这个是老站点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                

点赞 (0)

收藏 (0)
转载请务必注明: 来源:《建站管家》https://www.df81.com/news/195.html

本站部分信息来源网络,如有侵权,请联系QQ:1062129401删除。

上一篇: 鸿蒙是什么?大白话理解:华为鸿蒙OS操作系统

下一篇: 高考,是最好的成年礼,2021年高考作文题

请先登录后,再发表评论 ~ ~
发表评论
评论 (0)

发表帖子
广告位招租( ¥5 / 天 )
点击咨询
最新帖子

南国老符
2025-05-26 16:54
南国老符
2024-09-29 10:29
南国老符
2023-12-15 21:41
广告位招租( ¥5 / 天 )
点击咨询
最近评论

U
user1379
回复:版本号多少?
U
user1379
回复:新版本修复了,下载新版本即可
U
user1379
U
user1304
回复:默认没有这个功能,你可以自行二次开发后期可能会考虑在站群版本上加入此功能及商城功能
Y
yuanis90
回复:后台->语言->全局管理->模型管理->编辑->启用关键词内链即可
Y
yuanis90
回复:后台已经启用了,但是前台产品说明的关分键词还是没有自动链接到,
购买VIP
购买授权
余额充值
发表帖子
客服微信