Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Treat .htm files as .asp. Something to do with .htaccess?

Status
Not open for further replies.

shaunacg

Programmer
Aug 1, 2003
71
GB
Hi,

I have a site already launched with an index.htm page as the initial page. I need to add asp to it now, but don't want to have to change all of the other links to index.asp. Can I set it so that the index.htm page can have asp in it and function like a .asp page? I'm using an IIS Windows Server. Can I use HTAccess, or is it something else for IIS Windows?

Thanks.

shaunacg
 
Its actually pretty easy, below are the steps to take

From IIS access the properties of the web, click on the home directory tab, then click on configuration

In the mappings section change the externsion .html to have the executable path that matches your one for asp pages (asp.dll)

That should do it,

Simon
 
.htaccess is an Apache only config

can you get to the IIS MMC? because this is where the changes will have to be made. Bear in mind this does cause extra load on the server because every .htm file will then be processed via asp.dll


However if your navigation is set up correctly the name of the default document won't matter, simply because you should not reference the default doc by name only the folder/domain name.


Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top