iis - Redirect to canonical URL is not working -


i'm trying set canonical url site (macton.com) add www in beginning. site hosted using iis , installed url rewriter extension.

here code put in web.config file. however, doesn't seem anything, because remains macton.com.

<system.webserver>     <rewrite>         <rules>             <rule name="rewrite www" stopprocessing="true">                 <match url=".*" />                 <conditions>                     <add input="{http_host}" pattern="^macton\.com$" />                 </conditions>                  <action type="redirect" redirecttype="permanent" url="http://www.macton.com/{r:1}" />             </rule>         </rules>     </rewrite> </system.webserver> 

after have bunch of <location> tags redirects work fine. tried using redirect macton.com → www.macton.com creates infinite redirect loop (duh!)

any idea why wouldn't working? everywhere says correct code!

this link can help: http://www.awseibert.net/how-to/redirecting-canonical-names-in-iis-7

have added macton.com binding of website?


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -