This is a discussion on 301 Redirects on Windows 2003 within the Server / Technical Administration Tips and Queries forums, part of the Webmaster Help category; I am needing to learn how to perform a 301 redirect on Windows 2003 that’s for ASP but the site ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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! |
| |||||
| Is moving the site to linux an option?
__________________ Hosting & Domains|Plesk Vps Hosting|Blog Tips|Films.ie|Gadgets|Monetisation Tips|Movie Chat Energise your forum! Click here for info |
| |||||
| 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.
__________________ :. Web Design & Development Web Design Ireland :. Search Engines Optimization Search Engines Optimization :. Directory Submission Directory Submission :. News & Press Release Ireland GiveItSocks.com :. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories :. I Have 2 Find It Directory SEF Directory |
| ||||
| Not at the moment, management decision Louie thanks for the code, I'll give that a shot. |
| |||||
| Pity ... it would make the problems go away
__________________ Hosting & Domains|Plesk Vps Hosting|Blog Tips|Films.ie|Gadgets|Monetisation Tips|Movie Chat Energise your forum! Click here for info |
| |||||
| 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?
__________________ Hosting & Domains|Plesk Vps Hosting|Blog Tips|Films.ie|Gadgets|Monetisation Tips|Movie Chat Energise your forum! Click here for info |
| ||||
| 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. |
| |||||
| ISAPI_Rewrite is the URL Rewrite engine for IIS so yes Blacknight it can be done.
__________________ :. Web Design & Development Web Design Ireland :. Search Engines Optimization Search Engines Optimization :. Directory Submission Directory Submission :. News & Press Release Ireland GiveItSocks.com :. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories :. I Have 2 Find It Directory SEF Directory |