Home · Standard Web Hosting · Dedicated Web Hosting · Managed Name Servers · E-Mail Services
 
Home
/ Browse Categories / SmartWeb / Linux Services / Changing your Default Index with an .htaccess File
Changing your Default Index with an .htaccess File

You can create a file called .htaccess in your public directory (www.mydomain.com). If you are already using an .htaccess file for website security, you should edit the existing file rather than creating a new one. Add the DirectoryIndex command AFTER the existing information, not before. The DirectoryIndex command in your .htaccess file should list the filenames that you would like a browser to look for in the order that you would like them to be used, separated by spaces. An actual command line might look something like this:

   DirectoryIndex index.html index.php3 default.htm default.html

In this case, a browser would look for an index.html file first, then index.php3, then default.htm, then default.html. This .htaccess file will be applied to every subdirectory of the directory it is placed in, so be sure to include any filenames that you are likely to use.



User Comments
Changing your Default Index with an .htaccess File
Add Comment
There are no user comments for this topic.
Add Comment
Additional Info
General Information
Article No. 64
Created: 01:09 AM 04.16.04
Author: Support

Attachments
No attachments.

Did this help you?
Yes No

Statistics
Yes610 (47%) Voted Yes711 (53%) Voted NoNo

Other Options
Print Article
Email Article

Related Articles
Home Page Naming Conventions
Working with CGI Scripts
Global Paths
Working with PHP

Copyright © 2013 myonlinehostingsupport.com