马春杰杰 Exit Reader Mode

[mcj]IIS8.5下进行301重定向

这是目前本站的web.config配置文件内容,做了301重定向以及伪静态

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
 <system.webServer>
  <rewrite>
   <rules>
	<rule name="/ Z-BlogPHP Imported Rule" stopProcessing="true">
	 <match url="^.*?" ignoreCase="false" />
	  <conditions logicalGrouping="MatchAll">
	   <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
	   <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
	  </conditions>
	 <action type="Rewrite" url="index.php/{R:0}" />
	</rule>
	<rule name="/ Z-BlogPHP Imported Rule index.php" stopProcessing="true">
	 <match url="^index.php/.*?" ignoreCase="false" />
	  <conditions logicalGrouping="MatchAll">
	   <add input="{REQUEST_FILENAME}" matchType="IsFile" />
	  </conditions>
	 <action type="Rewrite" url="index.php/{R:0}" />
	</rule>
	<rule name="WWW Redirect" stopProcessing="true">
	<match url=".*" />
	<conditions>
	<add input="{HTTP_HOST}" pattern="^machunjie.com$" />
	</conditions>
	<action type="Redirect" url="http://www.machunjie.com/{R:0}" redirectType="Permanent" />
	</rule>
   </rules>
  </rewrite>
 </system.webServer>
</configuration>
本文最后更新于2019年5月21日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!