« Previous Next »

Thread: Setting up 301 redirects

Last post 02-02-2007 8:37 AM by martin_smith. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 02-02-2007, 4:01 AM

    Setting up 301 redirects

    When developing a new website, we often produce files with the .aspx file extension. However, when creating a new website we have to 301 all the existing pages to the corresponding page.

    For example
    Sports.html -> Sports.aspx [301 redirect]
    Corporate_Events.php -> Corporate.aspx [301 redirect]

    We are in the process of producing a site, but need to redirect 300 html files.  The pain is that the redirects are not just the same file names with a different extention.

    Currently we have to set up these manually on a file-by-file basis and it is not efficient.  I believe that using Apache, you can place these redirects in a .htaccess file?

    Is there an equivalent method or system we could implement in IIS without having to manually go through every file?

    Thanks,
    Martin
  • 02-02-2007, 8:09 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 6:27 AM
    • Central NJ
    • Posts 6,174
    • IIS MVPs

    Re: Setting up 301 redirects

    Not sure of an IIS way, but you could map the html files to the ASP.NET dll and then write an HttpModule in ASP.NET that will check for what file was requested and handle the redirect.
  • 02-02-2007, 8:37 AM In reply to

    Re: Setting up 301 redirects

    Many thanks for the reply :-)  Tho, I guess I'll have to do it manually as that is a little beyond our .net knowledge.

    Thanks again.

    Martin
     

Page 1 of 1 (3 items)
Microsoft Communities