Subscribe:

Ads 468x60px

Pages

Wednesday, August 10, 2011

Change Default Directory index page using .htaccess


Default index pages in the webserver is index.html.

For example: When the index page as "index.html" is place in the document root of the apache. when you are typing url in the web browser as "www.example.com" then the default page "index.html" will be appears.

The default directory index pages are defined in the apache’s configuration file and it can be override from .htaccess file. To do so put the following code in the .htaccess file,

 
DirectoryIndex index.html index.htm index.php index.cgi


Remember that you can also append the other names of files in the DirectoryIndex directive and the order of the above “DirectoryIndex” directive determines the order of index file in web directory.



0 comments:

Post a Comment