|
|||
|
want to switch hom page from index.html to index.php
Hi,
I am new to this panel. I have website keepitinthecloset.com. when i type that url it opens index.html page. But now i got new page index.php. I want this page as my default page. so when people type keepitinthecloset.com then it should opne index.php page. How can i make that change. someone told me htaccess file. if i have to make changes there then where is this file located and what kind of changes i have to make that index.php as my default home page. Any help will be appreciated. Thanks, Last edited by Infopro; 07-11-2008 at 08:11 PM. |
|
|||
|
If you want to have both index.html and index.php but you want index.php to be the default and it isn't, do this:
create an .htaccess file in your public_html folder (or in whatever folder you want this to occur in) and make its contents: DirectoryIndex index.php index.html That's just an example - you can leave out whatever you want to leave out. Just use DirectoryIndex to specify the preferred index to pull first. The first on the list should be index.php. You can add others to the list as well like index.htm, home.htm, default.htm. Now, keep this in mind... if by default your server pulls index.html first and you want to use this method to pull index.php first in the event that both files exist in a directory, this acts recursively. So, if you have a subdirectory that you serve other content from and it has an index.php and an index.html and you wish for index.html to take precendence in that subdirectory, you'll have to add another .htaccess in there to change it back. Mike Last edited by mtindor; 07-12-2008 at 08:15 PM. |
|
|||
|
Thanks yo...
I tried to rename it earlier but then default page didn't open and gave me error. page missing. But Mike i really appreciate your help. Thanks for your solution. It worked out perfactly fine. I spent almost 6 hours to figure it out this issue and even after that i couldn't. But now its working perfactly fine. You are the man buds. Once again thanks for your help.... Bj. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|