godaddy服务器上托管的php网站中的https重定向
我用php创建了一个网站,托管在godaddy服务器上。在这个服务器上,我使用ssl证书进行安全保护,并使用web.config文件编写了一些重定向http到https的代码 我的代码如下:-godaddy服务器上托管的php网站中的https重定向,php,Php,我用php创建了一个网站,托管在godaddy服务器上。在这个服务器上,我使用ssl证书进行安全保护,并使用web.config文件编写了一些重定向http到https的代码 我的代码如下:- <?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.5" /> &l
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" targetFramework="4.5" />
<customErrors mode="Off"/>
<trust level="Full"/>
</system.web>
<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="Permanent" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
<connectionStrings>
<add name="mycon" connectionString="Data Source=182.50.133.111;Initial Catalog=TripBrip;Integrated Security=False;User Id=TripBrip;Password=TripBripWork@12;" providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
)那是一场安全的https秀。我的代码不会自动重定向到https代码,所以我用哪种方式解决这个问题请任何人帮助我