こんにちは私はMicrosoft AzureでホストされているcodeigniterアプリケーションのHTTPSへのすべてのHTTPリクエストをリダイレクトしようとしています。 web.configファイルに次のコードを挿入しましたが、リダイレクトが機能していないようです。HTTPリダイレクトをHTTPSにリダイレクトCodeigniterをMicrosoft Azureにデプロイ
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!-- BEGIN rule TAG FOR HTTPS REDIRECT -->
<rule name="Force HTTPS" enabled="true">
<match url="(.*)" ignoreCase="false" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}" appendQueryString="true" redirectType="Permanent" />
</rule>
<!-- END rule TAG FOR HTTPS REDIRECT -->
<rule name="Rewrite to index.php">
<match url="index.php|robots.txt|images|test.php" />
<action type="None" />
</rule>
<rule name="Rewrite CI Index">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" pattern="css|js|jpg|jpeg|png|gif|ico|htm|html" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
設定が必要なファイルがありますか?私はフックを作成するだけでなく、.htaccessファイルを変更しようとしました。
web.configファイルでHTTPSリダイレクトが機能しない理由を知りたい場合や、その他の手順が必要な場合は、動作させる必要があります。
ありがとうございます!
更新情報がありますか? –