I have a website on vps and set https on it. but when users open site with www, get error 403 - Forbidden: Access is denied.
I want when users open www.tavanyar.ir website goes redirect to https://tavanyar.ir
please help me to set my web.config
I have a website on vps and set https on it. but when users open site with www, get error 403 - Forbidden: Access is denied.
I want when users open www.tavanyar.ir website goes redirect to https://tavanyar.ir
please help me to set my web.config
<rule name="RedirectWwwToNonWww" stopProcessing="false">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" />
</conditions>
<action type="Redirect" url="https://{C:2}{REQUEST_URI}" redirectType="Permanent" />
</rule>