web.config redirecciona no www a www
Necesito redireccionar direcciones URL que no sean www a www url para las direcciones http y https. Intenté seguir las reglas en web.config.
<rule name="Redirect to WWW" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^domain.com$" />
</conditions>
<action type="Redirect" url="http://www.domain.com/{R:0}" redirectType="Permanent" />
<rule name="Redirect to WWW https" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTPS}" pattern="^domain.com$" />
</conditions>
<action type="Redirect" url="https://www.domain.com/{R:0}" redirectType="Permanent" />
Funciona perfectamente para url no ssl, pero en el caso de ssl redirige desdehttps://dominio.com ahttp://www.domain.com
Por favor ayúdame a corregir mis reglas.