我有一个存储在azure上的网站,我获得了SSL证书.我正在尝试将www.mywebsite.com重定向到https://www.mywebsite.com,但没有成功.
我使用以下代码来更改部署项目的IIS的配置:
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to HTTPS">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
<add input="{URL}" pattern="/$" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Redirect" url="https://{SERVER_NAME}/{R:1}" redirectType="SeeOther" />
</rule>
</rules>
</rewrite>
Run Code Online (Sandbox Code Playgroud)
但是当我输入我的URL时,它不会重定向到https.
顺便说一下,重写似乎没有被Intellisense重新识别.
这应该是一个快速...这是我目前的.htaccess文件:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Run Code Online (Sandbox Code Playgroud)
我需要做的是确保如果http://www.mydomain.com/cart/达到,它需要强制HTTPS ...... /cart/以及其中的任何内容/cart/