Forum Moderators: open

Message Too Old, No Replies

How to set auto redirect to index.htm file ?

         

Vrindavan

4:04 am on May 13, 2009 (gmt 0)

10+ Year Member



case ONE
How to set auto rediect to index.htm file ?
e.g.
http://example.com/fff/
will go to
http://example.com/fff/index.htm
instead of showing all the files at
http://example.com/fff/

case TWO
in case there is no index.htm file in that sub folder,
enter
http://example.com/fff/
how to set auto redirect to http://example.com

Thanks for help

[edited by: tedster at 5:01 am (utc) on May 13, 2009]
[edit reason] switch to example.com - no one can own it [/edit]

tedster

5:03 am on May 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is not something that html handles, instead it's in the server technology.

We've got dedicated forums for the two most common web servers - Apache [webmasterworld.com] or Windows IIS [webmasterworld.com]

brodyh

7:41 am on May 14, 2009 (gmt 0)

10+ Year Member



Generally you would want to configure your server to define which page it should look for by default in your site's subfolders, so that it will automatically redirect to the correct one (such as 'index.htm').

I think the second question has to do with error handling; again, this would be in your server's configuration.

If you wish you could do a simple redirect with HTML using meta tags, but this would be impractical for multiple folders on a website.