Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's easy to do this with the URL rewrite module through the web.config :</p> <pre><code>&lt;rewrite&gt; &lt;rules&gt; &lt;clear /&gt; &lt;rule name="Redirect naked domains to www.domain.com" stopProcessing="true"&gt; &lt;match url="(.*)" /&gt; &lt;conditions logicalGrouping="MatchAll"&gt; &lt;add input="{HTTP_HOST}" negate="true" pattern="^www\." /&gt; &lt;add input="{REQUEST_URI}" negate="true" pattern="^noredirect/forthis/page\.aspx$" /&gt; &lt;add input="{REQUEST_URI}" negate="true" pattern="^noredirect/forthis/page-as-well\.aspx$" /&gt; &lt;add input="{REQUEST_URI}" negate="true" pattern="^noredirect/forthis/page-as-well-too\.aspx$" /&gt; &lt;/conditions&gt; &lt;action type="Redirect" url="http://www.{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" redirectType="Permanent" /&gt; &lt;/rule&gt; &lt;/rules&gt; &lt;/rewrite&gt; </code></pre> <p>Or if you really only have a single page that doesn't need to be redirected, it can be even shortened to:</p> <pre><code>&lt;rewrite&gt; &lt;rules&gt; &lt;clear /&gt; &lt;rule name="Redirect naked domains to www.domain.com" stopProcessing="true"&gt; &lt;match url="^noredirect/forthis/page\.aspx$" negate="true" /&gt; &lt;conditions logicalGrouping="MatchAll"&gt; &lt;add input="{HTTP_HOST}" negate="true" pattern="^www\." /&gt; &lt;/conditions&gt; &lt;action type="Redirect" url="http://www.{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" redirectType="Permanent" /&gt; &lt;/rule&gt; &lt;/rules&gt; &lt;/rewrite&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload