• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Routing problem in CI

I try to remove welcome.php file from routes.php
And I change it to Home.php
The code is
$route['default_controller'] = "Home";

It is working fine in Localhost
But when i upload it in shared web hosting it is giving me error that
404 Page Not Found
The page you requested was not found.

So there is another way to call default controller in CI.
Please Help me
I am stuck here.

You will also need to rename your welcome.php controller file (system/application/controllers/welcome.php) to home.php and edit that file so that it looks like this....

class Home extends Controller {

function Home()

function index()

[eluser]Mike Ryan[/eluser]
Is your file named Home.php or home.php? If your shared host is running Linux, they must both have the same capitalisation.

Does browsing to www.yoursite.com/home/ work?

Yes it work.
When i try to browse

And My file Name is Home.php

Yes it works when i rename the file home.php from Home.php
Thanks for replying.
I really appreciate your help.
Thanks again

[eluser]Mike Ryan[/eluser]
No problem kalpesh, I'm glad I could help :-)

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.