Previous Next

Thread: 301 Redirect

Last post 09-18-2008 12:20 AM by demonzmedia. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 09-06-2008, 9:59 PM

    • Shanester
    • Not Ranked
    • Joined on 09-07-2008, 1:53 AM
    • Canada
    • Posts 2

    301 Redirect

    How do I set up a 301 - so that if a user vists any page of the old site, they will be automatically redirected to the new site?

    I know how to do this with the Apache .htaccess file, but not with IIS.

    I can upload (FTP) files to the server, but I don't have administrative access.

    Thanks,
    Shane.

  • 09-06-2008, 10:19 PM In reply to

    • mukhtard
    • Top 25 Contributor
    • Joined on 07-07-2008, 9:13 PM
    • Redmond, WA
    • Posts 165

    Re: 301 Redirect

    Take a look at http://www.highposition.net/301redirect.html

    Thanks,
    Mukhtar Desai
    IIS Performance Team

  • 09-06-2008, 10:32 PM In reply to

    • Shanester
    • Not Ranked
    • Joined on 09-07-2008, 1:53 AM
    • Canada
    • Posts 2

    Re: 301 Redirect

    Thanks for the link, but I don't have administrative access to IIS.

    In Apache, I can upload an .htaccess file. What do I do in IIS?

    Thanks,
    Shane.

  • 09-06-2008, 10:54 PM In reply to

    Re: 301 Redirect

    For IIS 6,

    You could use a 3rd party rewrite tool such as www.isapirewrite.com or other .NET based url rewrite tools that store the rules in web.config.  http://www.urlrewriting.net/149/en/home.html 

    For iis 7

    You would upload the rules in your web.config.

    Here is a good how-to using the GUI, which would create rules in your web.config.

    http://www.trainsignaltraining.com/windows-server-2008-http-redirection/2008-03-27/

    Or here is the syntax

    http://forums.iis.net/t/1146487.aspx

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield

    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 09-18-2008, 12:20 AM In reply to

    Re: 301 Redirect

    Quote: In Apache, I can upload an .htaccess file. What do I do in IIS?

     

    Solution - use a global.asax event to check the referring url and redirect to the "real" domain. I had the same problem and wrote up the solution in my blog (with code snippet) -

    http://www.demonzmedia.com/DemonzBlog/?p=13

     The http module idea is also good.

Page 1 of 1 (5 items)
Page view counter