Welcome Guest, Not a member yet? Register   Sign In
Getting "First Application" running on remote server
#1

I used Scriptaculous through cpanel to install Codeigniter at my Hostgator shared hosting server, in the root of a domain I have there. It delivers the welcome_message page OK, though the browser reads: http://<mydomain>/public/
I tried to follow the "Build Your First Application" tutorial, and have created the files it specifies (app/Controllers/Pages.php etc) in the hope that this might work, but it doesn't. The tutorial seems to describe operation on a local server and not on the Hostgator server. What do I do different from the "Build Your First Application" tutorial to have it run on the remote server? I suspect some combination of changes in Routes.php plus .htaccess files. Help!
I edited Routes.php to change $routes->setDefaultController('Home'); to $routes->setDefaultController('Pages'); and $routes->get('/', 'Home::index'); to $routes->get('/', 'Pages::index'); Then if I browse to http://<mydomain>/ I am redirected to http://<mydomain>/public and see a version of welcome_message that I modified. Good. But URLs mentioned in the tutorial like http://<mydomain>/pages/view/about etc give 404 errors.
I feel there is something trivial here....
Reply
#2

Did you set your app/Config/app.php base_url ?

Also make sure that the Controller name starts with an upper case letter.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB