My website behaves differently with http://example.com and http://www.example.com . I know these are considered as two different domains. But what do I do to fix this issue? People will mostly type example.com instead of the full url, therefore what should I do so that the two urls' point to the same website?
Rule
<rule name="RedirectToWWW" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern=".*your-domain\.com" />
<add input="{HTTP_HOST}" negate="true" pattern="www\.your-domain\.com" />
</conditions>
<action type="Redirect" url="https://www.your-domain.com/{R:1}" redirectType="Permanent"/>
</rule>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.