Page not found - home page
Permalink 1 user found helpful
I have finished building a site with c5 and it has worked great.
If I go tohttp://www.mysite.com/index.php... the home page displays fine. However, if I go tohttp://www.mysite.com I get a page not found error.
Not sure if it is a hosting error or something I am missing in the setup.
My site php file is:
<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'myusr');
define('DB_PASSWORD', 'mypwd');
define('DB_DATABASE', 'my_db');
define('BASE_URL', 'http://www.mysite.com');
define('DIR_REL', '');
define('PASSWORD_SALT', 'xxx');
?>
The site is hosted on an IIS7 server using plesk. Originally the default document type was Default.aspx. I have made this Index.php.
Has anyone seen this issue before or have any ideas.
Thanks.
If I go tohttp://www.mysite.com/index.php... the home page displays fine. However, if I go tohttp://www.mysite.com I get a page not found error.
Not sure if it is a hosting error or something I am missing in the setup.
My site php file is:
<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'myusr');
define('DB_PASSWORD', 'mypwd');
define('DB_DATABASE', 'my_db');
define('BASE_URL', 'http://www.mysite.com');
define('DIR_REL', '');
define('PASSWORD_SALT', 'xxx');
?>
The site is hosted on an IIS7 server using plesk. Originally the default document type was Default.aspx. I have made this Index.php.
Has anyone seen this issue before or have any ideas.
Thanks.
wasn't iss case sensative? so Index.php is not index.php
Plesk displays index.php as Index.php but I suspect IIS sees it as index.php. If i try to add index.php in teh area of plesk where you can add a default document, it ignores the request. Looks like IIS sees it as index.php.
Thanks
Thanks
Unfortunately I using a shared Windows Server so I can't use .htaccess file. The setup documentation that I have found so far relates to a server were you have access to the IIS install which i don't. I do have access to the web.config file, but have no idea of what to add.
The best thing you can do is call your hosting provider. They can change it for you. Never use documents that starts with a capital. :)
The capitalization does not seem to be the issue. The Index.php is capitalized in plesk due to css formatting. It is still seen by IIS as lowercase.
I have tested this by renaming my index.php.bak and then creating a new index.php page with just some text.
If I then go tohttp://www.mysite.com/ the new index.php file displays fine.
As soon as I rename both files so the c5 is the index page. I get page not found. It looks like a c5 issue.
Any other suggestions or ideas would be greatly appreciated.
Thanks
I have tested this by renaming my index.php.bak and then creating a new index.php page with just some text.
If I then go tohttp://www.mysite.com/ the new index.php file displays fine.
As soon as I rename both files so the c5 is the index page. I get page not found. It looks like a c5 issue.
Any other suggestions or ideas would be greatly appreciated.
Thanks
As it turned out you were correct. After further inspection, what appeared to be a css styling in Plesk. IIS was in fact seeing teh capitalization. Once Index.php was removed from Plesk's default documents and the application pool cleared. It all worked.
So if anyone is using a shared server IIS and Plesk, go to virtual directories > directory properties. Delete Index.php and add index.php. Save changes and then restart the application pool to clear any IIS caching.
Thank you to all your help.
So if anyone is using a shared server IIS and Plesk, go to virtual directories > directory properties. Delete Index.php and add index.php. Save changes and then restart the application pool to clear any IIS caching.
Thank you to all your help.
Works perfect. Thanks for the help!
I had exactly the same problem is IIS...
The rewrite would work for the following:
http://www.mysite.com/about >http://www.mysite.com/index.php/about/...
But wouldn't work for the home page.. i.e. wouldn't do the following:
http://www.mysite.com >http://www.mysite.com/index.php...
Turns out I had to remove Index.php from the default documents for that website in IIS, and add index.php .
:)
I had exactly the same problem is IIS...
The rewrite would work for the following:
http://www.mysite.com/about >http://www.mysite.com/index.php/about/...
But wouldn't work for the home page.. i.e. wouldn't do the following:
http://www.mysite.com >http://www.mysite.com/index.php...
Turns out I had to remove Index.php from the default documents for that website in IIS, and add index.php .
:)
go to Dashboard> Sitewide Settings: then look for the "linking urls" area. check the bock for pretty urls and then copy the resulting code to your .htacces file via a ftp program or you hosting's cpanel/file manager program.