November 5, 200620 yr I couldn't find which forum to put it in, so i think here is as good as any. Basically i'm doing a website for a client... he already had a website. How do I change it so that the default homepage is not default.html but index.php? Any Ideas? Cheers Dave
November 6, 200620 yr You can do this adding to the .htaccess file this line: DirectoryIndex index.php default.htm default.php index.htm index.html This line instructs the server to display in first instance index.php, otherwise it will look for default.htm, default.html and so on when index.php is missing. If there is not .htaccess file already, just make an empty text file with notepad, copy the above line and upload it to the server with the name .htaccess
November 6, 200620 yr That's a great tip, thank you mastermind, I had this problem a while back, but had to call my host to change it as a global setting on all my sites on the server, this would have definitely been a better solution, so one to bookmark. Thanks again and welcome to the forum. Ben
November 7, 200620 yr I've never thought about that - I've always just plonked my index.php files in the route directory and never had a porblem - didn't realise you had to instruct the server about it.
November 9, 200620 yr That's a great tip, thank you mastermind, I had this problem a while back, but had to call my host to change it as a global setting on all my sites on the server, this would have definitely been a better solution, so one to bookmark. Thanks again and welcome to the forum. Ben Mastermind always has the greatest of tips, his/her name is truly fitting. I combed through several books & Google and I never found this answer. Thank You! Once the question was asked, it was driving me crazy not being able to figure out how to do it.
Create an account or sign in to comment