That's a possibility, but unfortunately there are lots of nested Flash files with links to the HTML files - it would be MUCH faster & easier to redirect than to change & test all links site-wide.
Main Topics
Browse All TopicsOld site used .htm files; New site uses HTML files. All the search engine links still point to HTM files, so I need to do a permanent redirection of HTM files to HTML - but I'm on a Windows 2003 server where .htaccess methods apparently don't work. What can I do (please be search engine friendly)? Thanks!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You have the right idea, but as noted you can't use an .htaccess based solution in Win/IIS. What you need is a IIS-compatible URL rewriting method such as www.isapirewrite.com. This will allow you to create URL rewriting rules similarly to what you can do in Apache with mod_rewrite. This will rewrite .htm to .html and return the necessary 301.
Keep in mind that to install ISAPIrewrite (or something similar), you will need server access and if you are hosting on a Win/IIS-based shared hosting plan, your host may not support this and may not be willing to install it for you.
Another approach would be to do it manually for each page you want to create. For example, if you had page1.htm and it is now page1.html, you can create a redirect for page1.htm using either as server-side scripting language (see http://www.webconfs.com/ho
Again, depending on your hosting account, either may require more server access than you have. If so, speak to your hosting company. Both of these methods are less invasive than installing ISAPIrewrite, so they may be willing & able to help you.
Usually, yes. Since this is IIS, you would be better off using ASP than PHP probably, but the same limitation applies. You would typically use ASP scripting on an .asp page.
However, you can configure ASP to parse .htm files as well. In that case, it would work. This is where the server access and/or help from your host enters into it again.
Keep in mind that this is not something you would typically do as it would add to the server load (having ASP parse all of your normal pages), but since you would only have a handful of .htm pages and your main pages would be .html, it is a potential solution, albeit a lesser one to the solutions that have already been ruled out by virtue of this being a Windows/IIS-based shared hosting situation.
Well we might be on to something... The control panel allows me to enable server-side includes in .htm or .html files. (Presumably having just one .htm page would minimize server load.) The server can apparently use asp or asp.net - I've tried implementing both of those examples from your link above, but still no go. Any other steps I might be missing? (Examples from link above included here for reference:)
ASP Redirect
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.new
%>
ASP .NET Redirect
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Locati
}
</script>
Create a ASP-script that parses Request.ServerVariables("D
<%
If inStr(Request.ServerVariab
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", Request.ServerVariables("D
End If
%>
Configure IIS to use the ASP-file for 404-errors
If using the sample I posted, I forgot that you also nead to implement a check that the requested file isn't a file with html-extension. Otherwize, you will end up with a endless loop with the server redirecting html to htmll to htmlll etc
A better solution would be something like below:
<%
If InStr("Request.ServerVaria
If Split(Request.ServerVariab
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", Request.ServerVariables("D
End If
End IF
%>
humeniuk: I have confirmed that the server is configured to parse ASP in HTML documents, but it's still not working. Is the ASP code snippet above sufficient to do the job? Does it matter where it's located in the document, or what else is contained in the file?
henjoh09: Thanks for your suggestion. Unfortunately, I haven't been able to make that work, either. I've tried to configure a custom 404 error page through the Control Panel, but it doesn't seem to take. I'm beginning to wonder if the Control Panel actually does anything at all...
"humeniuk: I have confirmed that the server is configured to parse ASP in HTML documents, but it's still not working. Is the ASP code snippet above sufficient to do the job? Does it matter where it's located in the document, or what else is contained in the file?"
The determination is made by file extension, so make sure it is .htm instead of .html. The code above should do the job. In terms of where the code is located, the code IS the page, there is no need for any other code other than the redirect.
FWIW - I like henjoh09's approach. If you implement something like that to work for all .htm pages, it will make your life simpler as you won't need to create a new document for each redirected page.
Agreed. I miss the power/functionality of Apache's mod_proxy and mod_rewrite when using IIS
A step-by-step similar to what I suggested is found in the following KB about forcing HTTP->HTTPS redirection: http://support.microsoft.c
I have sent out a mailer saying - Click on the link www.xyz.com/offer
Now the problem is we forgot to ensure that the link should read as www.xyz.com/offer.html
The offer.html exists in the root directory of the website
Can i do a quick fix using htaccess so that www.xyz.com/offer gets redirected to www.xyz.com/offer.html
Please help urgent
Business Accounts
Answer for Membership
by: ryansotoPosted on 2008-09-05 at 06:34:40ID: 22398704
I believe that they will render the same why not open your .html and save as .htm