Quantcast
Viewing all articles
Browse latest Browse all 27852

How do you implement 301 redirects in IIS 6 using web.config?

Hi, I've recently redeveloped my website, and as a result some of the URLs have changed. I'm trying to add 301 redirects, so that PageRank from my old pages flow to my new pages.

I've found out from my hosting company that the server my site is hosted on is using IIS 6. I only have access to my server through FTP, so (as far as I know) I can only implement the 301 redirects by uploading a web.config file to the same folder that contains my webpages.

I created a blank web.config file, added the following code and uploaded it to see if it would work:

<?xml version="1.0"?><configuration><location path="test.html"><system.webServer><httpRedirect enabled="true" destination="http://www.mysite.com/contact.html" httpResponseStatus="Permanent" /></system.webServer></location></configuration>

Unfortunately, this has no effect. Visiting test.html doesn't result in a redirect to contact.html. Test.html just loads as normal and nothing happens.

I'm not sure if it's a coding issue, (as most of the forums seem to suggest the above code) or a configuration issue at the hosting company's end. They've informed me that it's a coding issue and that they don't have to install or configure anything at their end.

I'm new to web.config files, so I'm not sure if they're correct.

Can anyone shed any light on what the problem is, or what I have to do to get this to work? Any help would be greatly appreciated.

Thanks.


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>