MasterJiq
Member
- Jul 8, 2016
- 385
- 23
Hello,
I've making my website redirect to https with PHP code because when I am using web.config, its always appear 'Redirect too many times', so seems like my client will never show working https but show https on gray text.
Surely I know, to solve this problems only with https but when I using this web.config, my website always appear 'Redirect too many times'.
This is my web.config, I am on IIS 7.5 (Not working, I need to remove "Name="Redirect to https"" to make it working):
I've making my website redirect to https with PHP code because when I am using web.config, its always appear 'Redirect too many times', so seems like my client will never show working https but show https on gray text.
Surely I know, to solve this problems only with https but when I using this web.config, my website always appear 'Redirect too many times'.
This is my web.config, I am on IIS 7.5 (Not working, I need to remove "Name="Redirect to https"" to make it working):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="Redirect to https" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
</rule>
<rule name="Imported Rule 1-1">
<match url="^badge-imaging/badge/([^/]+)" ignoreCase="false" />
<action type="Rewrite" url="/badge-imaging/badge.php?badge={R:1}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<remove statusCode="403" subStatusCode="-1" />
<error statusCode="403" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />
<error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
Last edited: