I built a new website for someone and I want to put in a 301 for their old hompage which is at /index.htm.
I tried it through the 301 package and the rewriteurl.config but I'm getting a 404 through IIS 7. I think it's because IIS is trying to find the htm page before it lands to umbraco.
Figured it out. Added an index.htm page to my site with the following in it. If someone can reply and confirm that this is correct I will mark them as answered.
Meta refresh is a discouraged method for redirecting, breaks back-button, not a 301 redirect, etc... Something like this in your UrlRewriting.config file would be better (NOTE: not 100% sure how this will work on the SoftSys environment, their tech support is helpful though):
I don't think so...Are you getting a 301 header with that method?
You may have to adjust a setting in IIS to tell .NET to handle the .html file depending on which version of .NET and web.config you are using. I believe if you're using .NET 4.0 Integrated Pipeline and the correct config files you don't have to modify IIS though.
Redirect www.mywebsite.com/index.htm
I built a new website for someone and I want to put in a 301 for their old hompage which is at /index.htm.
I tried it through the 301 package and the rewriteurl.config but I'm getting a 404 through IIS 7. I think it's because IIS is trying to find the htm page before it lands to umbraco.
I'm on softsys shared hosting. How do I fix this?
Thanks!
Nate
Figured it out. Added an index.htm page to my site with the following in it. If someone can reply and confirm that this is correct I will mark them as answered.
HTTP/1.1 301 Moved Permanently
Location: http://www.newwebsite.com<html>;
<head>
<title>301 Moved Permanently</title>
<meta
http-equiv="Refresh"
content="0; url=http://www.newwebsite.com">
</head>
<body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.newwebsite.com">here</a> .</p>
</body>
</html>
Meta refresh is a discouraged method for redirecting, breaks back-button, not a 301 redirect, etc... Something like this in your UrlRewriting.config file would be better (NOTE: not 100% sure how this will work on the SoftSys environment, their tech support is helpful though):
-Amir
I have that in my URLrewrite config, but IIS serves up a 404 before it reaches umbraco. That's my original question.
If I have
HTTP/1.1 301 Moved Permanently
Location: http://www.newwebsite.com
at the top of my HTML redirect page, will that do the 301?
I don't think so...Are you getting a 301 header with that method?
You may have to adjust a setting in IIS to tell .NET to handle the .html file depending on which version of .NET and web.config you are using. I believe if you're using .NET 4.0 Integrated Pipeline and the correct config files you don't have to modify IIS though.
is working on a reply...