Welcome Guest, Not a member yet? Register   Sign In
godaddy - index.php? - default controller
#1

[eluser]marbletravis[/eluser]
I am using godaddy.com as a host and had to use index.php? in order to get the URI to work properly. Now I cannot get the default controller to work (it never worked before either). Is this another godaddy.com issue or is it because of the ? after the index.php. any ideas on making the default controller work?

Thanks
Travis
#2

[eluser]TheFuzzy0ne[/eluser]
OK, typically, URL should look like this:

yourdomain.tld/index.php/controller/method

If that doesn't run the correct method in the right controller, you'll need to try the different URI protocols in your config.php.

You're URL shouldn't have a '?' in it, unless you've enable query strings.
#3

[eluser]marbletravis[/eluser]
With godaddy the only way I can get the URI to work is to add the ? as it states in the following link

http://ellislab.com/codeigniter/user-gui...oting.html

however when I try and go www.pc-2u.net/farm/index.php to load the default controller (farms) it does not work, if I go www.pc-2u.net/farm/index.php/farms/ then it works.

Travis
#4

[eluser]TheFuzzy0ne[/eluser]
Can you give us some more information? I think you may have configured your default route incorrectly.

Please provide the following information:

- The exact name of the controller file
- The exact name of the controller class name
- Your controller declaration (inclusing constructor)
- The contents of your routes.php file
#5

[eluser]marbletravis[/eluser]
here is the routes.php file, I removed the comented instructions as there is not point in them, let me know if you really want them. Note I tried both 'Farms' and 'farms' neither worked.

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$route['default_controller'] = 'farms';
$route['scaffolding_trigger'] = 'scaffolding';

the controller file is farms.php
the controller clas name is Farms.

here is the farms.php file,
Code:
<?php
class Farms extends Controller {
    function Farms()
    {
        parent::Controller();
        $this->load->scaffolding('farms');
        $this->load->helper('form');
        $this->load->helper('url');
    }
    function index()
    {
        $this->load->view('farms_view');
    }
}
?>
#6

[eluser]Jondolar[/eluser]
Please post your .htaccess file if you have one. There might be something going on there as well.
#7

[eluser]TheFuzzy0ne[/eluser]
Your set up looks fine to me. I can only conclude that it must be the URI protocol that's the problem, as I've never heard of this particular problem on a godaddy.com server.
#8

[eluser]Daniel Moore[/eluser]
The "Removing index.php from CodeIgniter" article I wrote covers GoDaddy.com hosting. If you read all the way through to the bottom, you will see it tells you how to set up your CodeIgniter config file as well.

I've used GoDaddy.com for several clients, and it works great. The .htaccess is on that page also, well, it's most of the page. It's heavily documented, so it should get you up and running in no time. Follow the documentation in the .htaccess and set it up accordingly, and you should be fine.




Theme © iAndrew 2016 - Forum software by © MyBB