Skip to content

Instantly share code, notes, and snippets.

@pabloprogramador
Created November 14, 2014 09:58
Show Gist options
  • Save pabloprogramador/c6f6101706ef932cd76a to your computer and use it in GitHub Desktop.
Save pabloprogramador/c6f6101706ef932cd76a to your computer and use it in GitHub Desktop.
REMOVER WWW URL
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=152368
-->
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Remove WWW" stopProcessing="true">
<match url=".*" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^www\.(.*)$" />
</conditions>
<action type="Redirect" url="http://{C:1}/{R:0}" appendQueryString="true" redirectType="Temporary" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment