Welcome Guest, Not a member yet? Register   Sign In
Fix problem error 404 when run codeigniter in hosting
#1

[eluser]huutri[/eluser]
Dear all

I used codeigniter to create my website. all thing very well when i run it at localhost. But i upload it to hosting (http://www.congmanit.com), i meet a problem: "404 Page Not Found. The page you requested was not found."

I fixed it and i want to share how to resolve this error:

1) When you create new controller you should named file name is lowercase. Example: product.php,...

2) Having a problem in code of codeigniter: In libraries/router.php contains _validate_request function. See code below:

if (file_exists(APPPATH.'controllers/'.$segments[0].EXT))
{
return $segments;
}

I think we should strtolower function in php to change all controller name to lowercase. Preventing case controller name is lowercase and uppercase. Examples: TemplateUser => templateuser.

Phan Huu Tri
#2

[eluser]InsiteFX[/eluser]
If you read the User's Guide, it tell's you that only libraries use uppercase
filenames all other files are lowercase!

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB