Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-Cart 8.0 Hint''s and Tips
 Redirect HTTP to HTTPS from web.config
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

danielrichardson
VP-CART Super User

Australia
276 Posts

Posted - October 10 2016 :  09:19:25  Show Profile  Reply with Quote
Does anyone know how to redirect http protocol to https protocol in web.config?

Thanks

swampthink
VP-CART New User

106 Posts

Posted - October 12 2016 :  09:12:13  Show Profile  Reply with Quote
You can add the following code in the web.config

<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - October 18 2016 :  16:13:34  Show Profile  Visit serjtankian's Homepage  Reply with Quote
here''s the complete web.config rule:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>






*peace - serj*
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00