KTCHost Official Web Hosting Forum

Technical Support => Tutorials / How tos? => Topic started by: Anant on February 24, 2017, 05:38:31 PM

Title: How to set default page for website using htaccess file
Post by: Anant 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