Force WWW on Azure with web.config

Having issues forcing WWW on web.config. I am using the code below but having issues when not using WWW. at the start and wanting /about/ to be the target, but the script forces the WWW but forgets about the /about/. Example of script and results below.

I’m guessing a simple / or $ or something else will fix the entire world for me.

<rule name="Add WWW prefix" stopProcessing="true"> <match url="(.*)" ignoreCase="true" /> <conditions> <add input="{HTTP_HOST}" pattern="^$" /> </conditions> <action type="Redirect" url="{R:0}" redirectType="Permanent" /> </rule> 

Desired URL: Correctly to the desired URL to to

submitted by /u/ChrisHallUK
[link] [comments]

Leave a Reply