Status
Not open for further replies.

Gavin

New Member
I am needing to learn how to perform a 301 redirect on Windows 2003 that’s for ASP but the site is actually html. I have no idea why this server was chosen for hosting the site.

As far as I know to perform a 301 re-direct on an html site I would need ISAPI_Rewrite -http://www.isapirewrite.com/docs/ - I have tried the lite version but it fails to redirect the pages.

I have read that I could use a script command in the header of the page with the redirect but that doesn’t make a difference.

I have also tried going into the properties of the file via IIS and configure the file to redirect but it makes no difference, the file can still be accessed normally (isn’t this option for ASP pages only?)

Here is what I am trying to re-direct.

www.domain.com/index.html > www.domain.com/
www.domain.com/directory/index.html > www.domain.com/directory/

Anyone have any ideas on how this done? Long live apache and .htaccess!
 

mneylon

Administrator
Staff member
Is moving the site to linux an option?
 

louie

New Member
from an asp page you will do the redirect as below:

<%
' Permanent redirection
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "http://www.domain_name.tld/"
Response.End
%>

from an html page you have to use the Meta refresh tag

<meta http-equiv="refresh" content="1; url=http://www.domain_name.tld/">

where 1 is measured in seconds.
 

mneylon

Administrator
Staff member
Hmmmmm

In Apache you can "trick" the server into parsing any filetype as another eg. you could treat .html files as php
Is the same possible with IIS?
 

Gavin

New Member
I am not sure if that can also be done with IIS, I am at a very basic level with this.

I did manage to configure ISAPI_Rewrite and redirect all the pages that I needed. That ISAPI_Rewrite is a great tool once you have it up & running.
 
Status
Not open for further replies.
Top