Welcome to WebmasterWorld Guest from 54.159.50.111

Forum Moderators: ocean10000

Message Too Old, No Replies

How to process .htm files as ASP?

Is there a mod rewrite equivalent for IIS?

     
7:14 am on Aug 5, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 9, 2002
posts:47
votes: 0


I have a website with static html pages. Now I want to add some dynamic content and add some server side scripting. The problem is that I can rename the pages to .asp as this would break the the incomming links to my site and search engine listings. If this was a linux server I could have used mod rewrite or enabled php for .htm files. How can I achieve this on a Windows 2003 server with IIS?
7:54 am on Aug 5, 2004 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator ianturner is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 19, 2001
posts:3452
votes: 12


In IIS Properties for the site Home Directory - hit the configuration button - this shows you the App Mappings, set up a mapping for .htm to the ASP DLL.
11:52 am on Aug 5, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 9, 2002
posts:47
votes: 0


Thanks for the suggestion. But this is a shared hosting account and I don't have access to those settings.
12:51 pm on Aug 5, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 2, 2003
posts:1184
votes: 0


Your host might let you do that. I believe that Mapping is relative to the site via the site properties not the collection of sites.
1:59 pm on Aug 5, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Feb 27, 2003
posts:637
votes: 0


If the host won't allow mapping, see if they will allow a custom mime type. If so, you can set the mime type of .html to text/asp.
8:12 pm on Aug 5, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 9, 2002
posts:47
votes: 0


Thanks guys! I asked my website hosts and they gladly mapped .htm files to ASP. Problem solved!