CodeIgniter Forums
Problem with hosting ci in Godaddy - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Problem with hosting ci in Godaddy (/thread-27573.html)



Problem with hosting ci in Godaddy - El Forum - 02-15-2010

[eluser]chefnelone[/eluser]
Hello

I finish a site which works fine in my localhost.
Now, I uploaded it to a godaddy's shared hosting, and it doesn't work.

I try to access to http://www.myDomain.com/clients/client/index.php/index
All I get is a 404 error.

What I've done:

1- removed all rules from .htaccess (it's empty)

2- in config.php I set:
Code:
$config['base_url']    = "http://www.myDomain.com/clients/client/";
$config['index_page'] = "index.php"; // also tried with $config['index_page'] = "index.php?";
$config['uri_protocol']    = "REQUEST_URI";//AUTO didn't work.


What can I do?


Problem with hosting ci in Godaddy - El Forum - 02-15-2010

[eluser]hotmeteor[/eluser]
Well, I'm going to assume your controller is called "clients", and is your default one. So you should be going to:
<code>http://www.myDomain.com/index.php/clients/client/</code>

In your config > routes.php file, make sure that this line:
<code>$route['default_controller'] = "clients";</code>

is pointing to your default controller ("clients").

Once you have that sorted out we'll try the .htaccess file. And make sure you read the manual!


Problem with hosting ci in Godaddy - El Forum - 02-15-2010

[eluser]chefnelone[/eluser]
[quote author="hotmeteor" date="1266259765"]Well, I'm going to assume your controller is called "clients", and is your default one. So you should be going to:
<code>http://www.myDomain.com/index.php/clients/client/</code>

In your config > routes.php file, make sure that this line:
<code>$route['default_controller'] = "clients";</code>

is pointing to your default controller ("clients").

Once you have that sorted out we'll try the .htaccess file. And make sure you read the manual![/quote]

No, the ci application is in http://www.myDomain.com/clients/client/
$config['base_url'] = "http://www.myDomain.com/clients/client/";

The controller is index, then I access it using: http://www.myDomain.com/clients/client/index.php/index

and:
$route['default_controller'] = "index"

I have all working fine in my localhost, even the .htaccess to remove index.php


Problem with hosting ci in Godaddy - El Forum - 02-15-2010

[eluser]hotmeteor[/eluser]
Hm, I see. I wonder if there's a serverside issue in naming the controller 'index', since that's a default filename. Have you tried to call the controller something else?


Problem with hosting ci in Godaddy - El Forum - 02-15-2010

[eluser]danmontgomery[/eluser]
http://codeigniter.com/wiki/Godaddy_Installaton_Tips/