Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anthony LAwson 1 post 21 karma points
    May 10, 2011 @ 03:13
    Anthony LAwson
    0

    301 Redirect default.aspx to homepage

    Hello I'm trying to redirect default.aspx to homepage using the code below but the code is not working

     

    <add name="some-name"
                            redirectMode="Permanent"
                            redirect="Domain"
                            ignoreCase="true"
                            rewriteUrlParameter="IncludeQueryStringForRewrite"
                            virtualUrl="http://www.domain.com/default.aspx"
                            destinationUrl="http://www.domain.com/" />

     

    Thanks

  • skiltz 501 posts 701 karma points
    May 10, 2011 @ 03:43
    skiltz
    0

    Using IIS Rewriting you can create a rule like so..

     <system.webServer>
      <rewrite>   
       <rules>
           <rule name="Canonical home page" stopProcessing="true">
         <match url="^(home-page|default\.aspx)$" />
         <action type="Redirect" redirectType="Permanent" url="/" />
        </rule>
       </rules>
      </rewrite>
     </system.webServer>
Please Sign in or register to post replies

Write your reply to:

Draft