Default page only loads when I put /index.php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Default page only loads when I put /index.php

Post by thiscatis »

Really strange error here..

I have a script that looks for the page it needs to load in the url.

myurl.com/index.php?page=home

or when mod_rewrite is enabled
myurl.com/home/

the variable $page is set to "home" igf there is no get data set in the url.

The strange thing is that
when i just put myurl.com it loads the index.php file, but with an error that page in the system.
Even more strange, the variable $page is then set to "myurl" ???
when i put myurl.com/index.php, it loads ok

Even more strange is that it doesn't happen on all servers!

Is it looking for a html file or something else?

Don't have a clue here people...
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Im guessing you're messing around with a CMS.
Have this in your file to know all the errors.

Code: Select all

ini_set("display_errors" ,"1");
error_reporting(E_ALL);
Post Reply