广告位

您现在的位置是:主页 > 重定向 >

IIS的web.config实现正规则批量301跳转

2020-05-31 22:13重定向 人已围观

简介?xml version=1.0 encoding=UTF-8?configurationsystem.webServerhttpErrors errorMode=Customremove statusCode=404 subStatusCode=-1 /error statusCode=404 prefixLanguageFilePath= path=/404.shtml responseMode=ExecuteURL //httpErrorsrewriterulesrul...

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Custom">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/404.shtml" responseMode="ExecuteURL" />
</httpErrors>
<rewrite>

<rules>
<rule name="Redirect" stopProcessing="true">
<match url="^articlel-([A-Za-z0-9-]*).html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=71?sdal-cn-article" />
</rule>

<rule name="Redirect2" stopProcessing="true">
<match url="^detail-([A-Za-z0-9-]*).html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=73?sdal-cn-detail" />
</rule>
	
	
	<rule name="Redirect3" stopProcessing="true">
<match url="^lvjia-articlel-([A-Za-z0-9-]*).html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/category.php?id=858?sdal-cn-lvjia-articlel" />
</rule>
	
	<rule name="Redirect4" stopProcessing="true">
<match url="^product-([A-Za-z0-9-]*).html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/category.php?id=858?sdal-cn-product" />
</rule>
	
	<rule name="Redirect5" stopProcessing="true">
<match url="^list-([A-Za-z0-9-]*).html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/category.php?id=858?sdal-cn-list" />
</rule>
	
	<rule name="Redirect6" stopProcessing="true">
<match url="^company.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=71?sdal-cn-company" />
</rule>
	
		
	<rule name="Redirect7" stopProcessing="true">
<match url="^contact.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=88?sdal-cn-contact" />
</rule>

<rule name="Redirect8" stopProcessing="true">
<match url="^article-([A-Za-z0-9-]*).html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="/err.html" />
</rule>

<rule name="Redirect9" stopProcessing="true">
<match url="^factory-1.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=73?sdal-cn-factory" />
</rule>

<rule name="Redirect10" stopProcessing="true">
<match url="^test-1.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=73?sdal-cn-test" />
</rule>

<rule name="Redirect11" stopProcessing="true">
<match url="^case-1.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=149?sdal-cn-case" />
</rule>

<rule name="Redirect12" stopProcessing="true">
<match url="^news-([A-Za-z0-9-]*).html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=150?sdal-cn-news" />
</rule>

<rule name="Redirect13" stopProcessing="true">
<match url="^info-([A-Za-z0-9-]*).html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=150?sdal-cn-info" />
</rule>

<rule name="Redirect14" stopProcessing="true">
<match url="^baike-([A-Za-z0-9-]*).html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=115?sdal-cn-baike" />
</rule>
	
	<rule name="Redirect15" stopProcessing="true">
<match url="^Custom-1.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=115?sdal-cn-Custom" />
</rule>

<rule name="Redirect16" stopProcessing="true">
<match url="^support-1.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=88?sdal-cn-support" />
</rule>

<rule name="Redirect17" stopProcessing="true">
<match url="^service-1.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/article.php?id=88?sdal-cn-service" />
</rule>

<rule name="Redirect18" stopProcessing="true">
<match url="^answer-1.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="https://test.com/category.php?id=3?sdal-cn-answer" />
</rule>


<rule name="Redirect19" stopProcessing="true">
<match url="^mount-1.html" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="/err.html?sdal-cn-mount" />
</rule>

	</rules>
</rewrite>
</system.webServer>
</configuration>

 

如上;

Tags:

广告位
    广告位

本栏推荐

    广告位

标签云

站点信息

  • 文章统计74篇文章
  • 标签管理标签云
  • 微信公众号:扫描二维码,关注我们