site doesn't load index.php unless index.php is in URL

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
cnymike
Power Poster
Power Poster
Posts: 446
Joined: Sun Jan 22, 2006 3:24 am

site doesn't load index.php unless index.php is in URL

Post by cnymike »

I thought that webservers automatically always loaded an index.php page if a url specifies just a directory with no index.php appended to the URL.

But with my test install of CMSMS, just going to http://www.mywebsite.com/ , does not load my website but just shows the directory listing. Is this a server issue or a CMSMS issue?
Last edited by cnymike on Sun Jan 22, 2006 3:58 am, edited 1 time in total.
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm

Re: site doesn't load index.php unless index.php is in URL

Post by Greg »

Server issue.
Is this a local set-up or through a web-hosting service?

If local and you are using apache you need to add some lines to your httpd.conf file
e.g. AddType application/x-httpd-php .php
Greg
cnymike
Power Poster
Power Poster
Posts: 446
Joined: Sun Jan 22, 2006 3:24 am

Re: site doesn't load index.php unless index.php is in URL

Post by cnymike »

Greg,

It's a webhosting service (hostrocket.com)

The service has php and I use other CMS systems for other sites that I have. but I've never seen this issue before. Is this something that I can "fix" by going into .htaccess and adding something?
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: site doesn't load index.php unless index.php is in URL

Post by Ted »

I believe that putting

Code: Select all

Directory Index index.php
into your .htaccess file should fix the problem.  Though, I would probably get ahold of your hosting service, because that really should be working properly.
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm

Re: site doesn't load index.php unless index.php is in URL

Post by Greg »

I see hostrocket.com uses cpanel to control many aspects of your hosted service.
Check that php extensions are properly set up in your web service settings.
Also check this info
Greg
cnymike
Power Poster
Power Poster
Posts: 446
Joined: Sun Jan 22, 2006 3:24 am

Re: site doesn't load index.php unless index.php is in URL

Post by cnymike »

Ouch...I feel really guilty that I didn't look that faq up myself. thanks.
(cnymike is now sheepishly leaving the forum...for now)
cnymike
Power Poster
Power Poster
Posts: 446
Joined: Sun Jan 22, 2006 3:24 am

Re: site doesn't load index.php unless index.php is in URL

Post by cnymike »

wishy,

I actually tried your code but it didn't work. this worked however...

DirectoryIndex index.php

I guess the extra space between Directory and Index was the problem.

Michael
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: site doesn't load index.php unless index.php is in URL

Post by Ted »

Ah, there you go.  That's what I get for not testing stuff I find on the net first.  :)  Glad it's working now.
Post Reply

Return to “CMSMS Core”