문제

I wish all requests to www.liamblizard.co.uk to be redirected to liamblizard.co.uk

This is the rule i've got in web.config to do the rewrite

<rule name="Canonical Hostname" stopProcessing="false">
      <match url="(.*)" />
      <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" />
      </conditions>
      <action type="Redirect" url="http://{C:2}{REQUEST_URI}" redirectType="Permanent" />
    </rule>

but all requests to www.liamblizard.co.uk fail

enter image description here

Do I need to do anything at the DNS level, ie: CNAME records, or should that IIS rule take care of everything?

The site is an Azure Standard Website if that matters.

도움이 되었습니까?

해결책

At your DNS, update the www CNAME record to point to liamblizard.co.uk

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top