Bluehost.com Web Hosting $6.95

HTTP redirects

This is a discussion on HTTP redirects within the Windows Web Servers forums, part of the Web Server and Related Forums category; Greetings. Can anyone tell me how to implement HTTP redirects on a Microsoft web server? I have recently taken over ...


Go Back   Usenet Forums > Web Server and Related Forums > Windows Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-26-2004
Tristan Miller
 
Posts: n/a
Default HTTP redirects

Greetings.

Can anyone tell me how to implement HTTP redirects on a Microsoft web
server? I have recently taken over maintenance of a Microsoft-hosted site
and the server clearly doesn't support Apache-style .htaccess files. The
hosting company tech support is practically useless; they didn't seem to
know what an HTTP redirect was and didn't understand why a JavaScript
redirect wouldn't suffice. They eventually pointed us to a web page which
told us to replace each individual file to be redirected with something
like the following:

<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.nothingisreal.com/"
%>

However, this seems to work only if the file's extension is `.asp'. As our
files have a variety of extensions and content types (`.html', `.htm',
`.txt', `.pdf', `.jpg', `.gif', etc.), this solution is clearly
inadequate.

Regards,
Tristan

--
_
_V.-o Tristan Miller [en,(fr,de,ia)] >< Space is limited
/ |`-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <> In a haiku, so it's hard
(7_\\ http://www.nothingisreal.com/ >< To finish what you
  #2 (permalink)  
Old 09-26-2004
Jim Patterson
 
Posts: n/a
Default Re: HTTP redirects

Tristan Miller wrote:
> Can anyone tell me how to implement HTTP redirects on a Microsoft web
> server? I have recently taken over maintenance of a Microsoft-hosted site
> and the server clearly doesn't support Apache-style .htaccess files. The
> hosting company tech support is practically useless; they didn't seem to
> know what an HTTP redirect was and didn't understand why a JavaScript
> redirect wouldn't suffice. They eventually pointed us to a web page which
> told us to replace each individual file to be redirected with something
> like the following:
>
> <%@ Language=VBScript %>
> <%
> Response.Status="301 Moved Permanently"
> Response.AddHeader "Location", "http://www.nothingisreal.com/"
> %>
>
> However, this seems to work only if the file's extension is `.asp'. As our
> files have a variety of extensions and content types (`.html', `.htm',
> `.txt', `.pdf', `.jpg', `.gif', etc.), this solution is clearly
> inadequate.


IIS has support for doing this kind of thing directly from IIS Manager.
Open up the Properties page on the web site you want to redirect (or a
subfolder if you just want to redirect part of the site). Look for the
"Home Directory" tab (or "Directory" or "Virtual Directory" on
subfolders). From that tab you can switch it from "A directory on this
computer" to "A Redirection to a URL". That should do what you want.

--
Jim Patterson
Ottawa, Ont
CANADA
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 11:13 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0