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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTAccess Equiv on IIS 5

Status
Not open for further replies.

CharlieMike73

Programmer
May 17, 2002
120
US
Hi,

We are using an IIS webserver for our Intranet, and I need to perform some changes for a particular site/folder.

We recently changed the extensions from .htm to .asp as we made some of the content dynamic; however, now the search function does not work as it is still looking for the .htm files.

There are too may files to make redirect pages for each page/file, so is there a way to tell IIS to redirect to the .asp extension for any requests for .htm, .html, or .shtml in just that folder (plus sub-folders).

I know you can do this with htaccess, but that is for Apache.

1. What equiv. does IIS have to this?
2. What is the structure/formating of the htaccess equiv. file for IIS?

Thnx,
Charlie
 
hi,

You looked the configurations of 'Default Documents'?
Right click at the folder, Properties, Documents. Add your ASP default document. Ex: index.asp

good luck
 
I should point out that I do not have access to the IIS administration toolset, and our IS section is far from cooperative in anything under a week or two.

Is there any other way, other than the above (much appreciated - yet not viable) solution.

Further does the soultion above resolve all requests for various files, or just for index.htm to index.asp?

I need a solution for ALL requests for files with a .htm extension to be redirected to the new .asp file.
 
hi again,

when you type an URL without page name, ex: the server look for a default document enabled in the IIS (ex index.asp, main.asp).

if the server find a default document, he shows it. If not, you can browse the folder content or not (depends on the configurations).

If you have only HTM default documents enabled, you can change the source codes of them to redirect to a ASP file.

you can use META REFRESH / REDIRECT, or javascript.
example of META:
<meta http-equiv=&quot;refresh&quot; content=&quot;10;url=http://www.mysite.com/books/main.asp&quot;>

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top