frenchie
frenchie

Reputation: 51997

homepage url as example.com/ rather than example.com/index.html

I have a site I want to deploy and as part of the finishing touch, I'd like to have the url in the browser show www.example.com/ instead of www.example.com/index.html

How is this done?

Upvotes: 2

Views: 109

Answers (2)

Uwe Keim
Uwe Keim

Reputation: 40736

You could do this by "redirecting" requests of one URL (www.example.com) to another URL (www.example.com/index.html). This is done server-side by sending a HTTP 301 (or 302) to the user's browser.

Normally you use so called "rewrite" tools that intercept a request on your webserver and by executing rules that are made out of Regular Expressions. The rules decide whether/how to redirect.

Tools

You could install the official Rewrite module for IIS, if you are using IIS 7 or above. If you are using IIS 6, you could use the Open Source UrlRewriter.NET.

Personally, I have very good experiences with both of them, even together inside one single project.

Upvotes: 1

Kiran
Kiran

Reputation: 376

If all that is needed is the default redirect for the website, consider using httpRedirect feature in IIS7\IIS6.

Upvotes: 0

Related Questions