<system.webserver>
<rewrite>
<rules>
<rule name="Redirect to WWW" stopprocessing="true">
<match url="(.*)">
<conditions>
<add input="{HTTP_HOST}" negate="true" pattern="^www\.([.a-zA-Z0-9]+)$">
</add>
</conditions>
<action appendquerystring="true" type="Redirect" url="http://www.{HTTP_HOST}/{R:0}">
</action></match></rule>
</rules>
</rewrite>
</system.webserver>
Just some random development ramblings mostly related to the Microsoft .NET platform.
Sunday, June 9, 2013
IIS URL Rewrite non-www site to www
Use the IIS URL Rewrite module to route a site without "www" prefix to your standard "www" site. Below is the web.config section to do this.
Subscribe to:
Post Comments (Atom)
Can't RDP? How to enable / disable virtual machine firewall for Azure VM
Oh no! I accidentally blocked the RDP port on an Azure virtual machine which resulted in not being able to log into the VM anymore. I did ...
-
Here is a full test program that demonstrates how to use SharpZipLib to zip an XElement into a byte array. This allows you to transfer larg...
-
Oh no! I accidentally blocked the RDP port on an Azure virtual machine which resulted in not being able to log into the VM anymore. I did ...
No comments:
Post a Comment