Forum Moderators: open

Message Too Old, No Replies

Server-Side redirect in IIS

How to set up a server-side redirect in IIS

         

Darkelve

8:50 am on Mar 31, 2004 (gmt 0)

10+ Year Member



Hi all,

We recently launched a new website and consequently some pages got moved. I would like to redirect a couple of old pages/links that were frequently visited on the old site, to the new location. I suspect a lot of visitors have them in their bookmarks or they got it via a search engine (or the cache thereof).

Some people told me to use a http-redirect in the page itself, but when reading some more professional publications (e.g. Useit.com, ala, ...) it seems in this case a server-side redirect is more appropriate.

How can you set this up in IIS? I searched the internet and Microsofts website(s), but found no exact match. Can anyone explain or provide a link?

Thanks,

Darkelve

IanTurner

9:24 am on Mar 31, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



A number of possibilities:

If the pages are .asp you can just put

server.transfer "new_page.asp" onto the page

If the pages are not asp you can force the extension to be processed as ASP and use the server.transfer

Or you could set up a Custom 404 page to redirect to the new locations.

Darkelve

10:04 am on Apr 2, 2004 (gmt 0)

10+ Year Member



Hi,

thanks for the suggestions, unfortunately although the server runs asp, those pages are not ASP, but plain html.

If I 'force' the extension to be processed as asp however, what will happen to the rest of the html pages (most are plain html with a couple of asp pages for e.g. forms)?

Is there anyway to force or redirect one or more particular pages?

For some strange reason I had the impression server-side redirects would be so simple as adding lines in the webserver's configuration file?

Darkelve

IanTurner

11:44 am on Apr 2, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



forcing.htm to be processed will cause all .htm files to be processed increasing load on the server.

A custom 404 could work, if you make the 404 page a .asp page

richlowe

8:23 pm on Apr 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To do a server side redirect in IIS, just go into the Internet Information Services program, drill down to the object you want to redirect and open the properties. It can be a wewb site, a folder or a single page (it must exist). Under the "Directory" tab you'll see some lines that say it can be local, a URL or a share. You can set URL and make this resource go to wherever you want. I've used it often and it works. The help button here has more info.

Richard Lowe

IanTurner

10:52 pm on Apr 2, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



richlowe - I thought I knew IIS until you said that!

I owe you beer in quantity

The ridiculous thing is that it is the first thing on the page, and yet my brain skips it at every viewing!

Darkelve

1:09 pm on Apr 5, 2004 (gmt 0)

10+ Year Member



Thank you Rich! (thank you also Ian).

That will probably be able to solve a lot of problems we're currently having.

I'll pay you back the favor if I can: I'm very experienced in usability and accessibility for websites and fairly good at css, although not as good as a lot of people around here (I'm more of a content manager&strategist than a designer or developer).

Thanks for the help&the fast response. I don't know if this topic should be locked, but if it should, I don't object.

Darkelve