将带有web.config的IIS重定向到PHP
我写这个文件是为了重定向,我不明白为什么第六个重定向不起作用。其他的都可以 我对IIS和ASP真的很陌生(并打算让自己保持这样:),但需要一些关于这方面的澄清,这样我才能继续将带有web.config的IIS重定向到PHP,iis,web-config,redirect,Iis,Web Config,Redirect,我写这个文件是为了重定向,我不明白为什么第六个重定向不起作用。其他的都可以 我对IIS和ASP真的很陌生(并打算让自己保持这样:),但需要一些关于这方面的澄清,这样我才能继续 <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="r1">
<match url="contact.aspx"/>
<action type="Redirect" redirectType="Permanent" url="http://www.doctornestor.co.il/contact/"/>
</rule>
<rule name="r2">
<match url="send2friend.aspx"/>
<action type="Redirect" redirectType="Permanent" url="http://www.doctornestor.co.il/contact/"/>
</rule>
<rule name="r3">
<match url="admin/login.aspx"/>
<action type="Redirect" redirectType="Permanent" url="http://www.doctornestor.co.il/wp-admin/"/>
</rule>
<rule name="r4">
<match url="members-club/join_member.aspx"/>
<action type="Redirect" redirectType="Permanent" url="http://www.doctornestor.co.il/newsletter/"/>
</rule>
<rule name="r5">
<match url="articles/dynamic-web-archive.aspx"/>
<action type="Redirect" redirectType="Permanent" url="http://www.doctornestor.co.il/blog/articles-and-newsposts/"/>
</rule>
<rule name="r6">
<match url="articles/dynamic-web-articles.aspx?page_id=55&parent_id=0&pgnm=%D7%97%D7%92%D7%99%D7%9D"/>
<action type="Redirect" redirectType="Permanent" url="http://www.doctornestor.co.il/blog/%D7%93%D7%99%D7%90%D7%98%D7%94-%D7%91%D7%97%D7%92%D7%99%D7%9D/"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
您的上一条规则(r6)无效。URL模式不能包含查询字符串。查询字符串必须通过条件单独匹配
以下是正确的规则:
<rule name="r6" stopProcessing="true">
<match url="^articles/dynamic-web-articles\.aspx$" />
<conditions>
<add input="{QUERY_STRING}" pattern="page_id=55&parent_id=0&pgnm=%D7%97%D7%92%D7%99%D7%9D" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="http://www.doctornestor.co.il/blog/%D7%93%D7%99%D7%90%D7%98%D7%94-%D7%91%D7%97%D7%92%D7%99%D7%9D/" />
</rule>
您的上一条规则(r6)无效。URL模式不能包含查询字符串。查询字符串必须通过条件单独匹配
以下是正确的规则:
<rule name="r6" stopProcessing="true">
<match url="^articles/dynamic-web-articles\.aspx$" />
<conditions>
<add input="{QUERY_STRING}" pattern="page_id=55&parent_id=0&pgnm=%D7%97%D7%92%D7%99%D7%9D" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="http://www.doctornestor.co.il/blog/%D7%93%D7%99%D7%90%D7%98%D7%94-%D7%91%D7%97%D7%92%D7%99%D7%9D/" />
</rule>