2014-03-26 33 views
0

我是新的ASP.net,我试图重定向只是联系我们页面https。其余的应该留在http中。在某种程度上,我能够做到这一点。我的问题是,当我从联系我们页面点击首页,它不会回到http ..它的遗体https。其他链接都很好。通过web.config的ASP.net重定向

下面是我的web.config的一部分。我希望有一个人可以帮助我。谢谢。

<rewrite> 
<rules> 

<rule name="root to http" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="https://www.bpicards.com/" /> 
<action type="Redirect" url="http://www.bpicards.com/" redirectType="Permanent" /> 
</rule> 

<rule name="Redirect non-www to www" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="*" /> 
<conditions> 
<add input="{HTTP_HOST}" pattern="bpicards.com" /> 
</conditions> 
<action type="Redirect" url="http://www.bpicards.com/{R:0}" redirectType="Permanent" /> 
</rule> 
<rule name="Cards-Details-54-slash" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="Cards/Details/54/" /> 
<action type="Redirect" url="/Cards/" redirectType="Permanent" /> 
</rule> 
<rule name="Cards-Details-54" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="Cards/Details/54" /> 
<action type="Redirect" url="/Cards/" redirectType="Permanent" /> 
</rule> 
<rule name="RealThrills-ItemDetails-155" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="RealThrills/ItemDetails/155" /> 
<action type="Redirect" url="/RealThrills/" redirectType="Permanent" /> 
</rule> 
<rule name="Contact Us" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="ContactUs" /> 
<action type="Redirect" url="https://www.bpicards.com/ContactUs/" redirectType="Permanent" /> 
</rule> 



<rule name="Cards" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="Cards" /> 
<action type="Redirect" url="http://www.bpicards.com/Cards/" redirectType="Permanent" /> 
</rule> 


<rule name="Real Thrills" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="RealThrills" /> 
<action type="Redirect" url="http://www.bpicards.com/RealThrills/" redirectType="Permanent" /> 
</rule> 


<rule name="BPI Buys" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="BpiBuys" /> 
<action type="Redirect" url="http://www.bpicards.com/Bpibuys/" redirectType="Permanent" /> 
</rule> 


<rule name="Sip" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="Sip" /> 
<action type="Redirect" url="http://www.bpicards.com/Sip/" redirectType="Permanent" /> 
</rule> 


<rule name="Calculators" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="Calculators" /> 
<action type="Redirect" url="http://www.bpicards.com/Calculators/" redirectType="Permanent" /> 
</rule> 


<rule name="ApplyNow" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="ApplyNow" /> 
<action type="Redirect" url="http://www.bpicards.com/ApplyNow/" redirectType="Permanent" /> 
</rule> 


<rule name="BPI Cards" patternSyntax="Wildcard" stopProcessing="true"> 
<match url="BpiCards" /> 
<action type="Redirect" url="http://www.bpicards.com/BpiCards/" redirectType="Permanent" /> 
</rule> 



</rules> 
</rewrite> 

回答