Author Topic: How to set default page for website using htaccess file  (Read 8998 times)

Anant

  • Guest
How to set default page for website using htaccess file
« on: February 24, 2017, 05:38:31 PM »
Many time we want to set different files as a default page for website but server side setting allows index.php, index.html or index.htm as a default page. We can use following simple htaccess code to set default index page as per requirement.

htaccess file code for single default page

Code: [Select]
#Alternate default index page
DirectoryIndex mypage.html

htaccess file code for multiple index page

Code: [Select]
#Alternate default index pages
DirectoryIndex mypage.html index.htm index.html index.php