#1 (permalink)  
Old 07-11-2008, 06:39 PM
Registered User
 
Join Date: Jul 2008
Posts: 7
websoftbiz is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-11-2008, 08:12 PM
Infopro's Avatar
Forum Moderator
 
Join Date: May 2003
Location: Pennsylvania
Posts: 3,498
Infopro is on a distinguished road
Lightbulb

Both pages work, try them. Don't want to use index.html? Rename it to index.html.OLD for now.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-11-2008, 08:35 PM
Registered User
 
Join Date: Sep 2004
Posts: 792
mtindor is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-12-2008, 05:57 PM
Registered User
 
Join Date: Jul 2008
Posts: 7
websoftbiz is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-12-2008, 08:14 PM
Registered User
 
Join Date: Sep 2004
Posts: 792
mtindor is on a distinguished road
No problem chief. Glad i could help

Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:46 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc