Getting 404 erro when trying to load public site |
[eluser]dirty[/eluser]
Hey all, I am having an issue getting a clients public site working properly. here is the site: http://www.revolutionchiros.com the issue is I am getting a 404 error on the index page. The site works fine on my local machines development environment and I changed the base Url in the config, so Im running out of ideas. Odd thing is, that its just the index returning a 404 you can access other controllers and they seem to work fine. http://www.revolutionchiros.com/index.php/IndexPage Any help would be greatly appreciated. Thanks
[eluser]bretticus[/eluser]
First question: Is this a 404 page generated by codeigniter or a 404 page generated by apache (or whichever webserver runs the public site?)
[eluser]sketchynix[/eluser]
As it is a codeigniter 404, check your default controller in the routes config file.
[eluser]dirty[/eluser]
the routes config is pointing to the IndexPage controller which works locally and if i switch to another default controller it works locally as well, but there is no change on the public site? here is the routes: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------------- | URI ROUTING | ------------------------------------------------------------------------- | This file lets you re-map URI requests to specific controller functions. | | Typically there is a one-to-one relationship between a URL string | and its corresponding controller class/method. The segments in a | URL normally follow this pattern: | | example.com/class/method/id/ | | In some instances, however, you may want to remap this relationship | so that a different class/function is called than the one | corresponding to the URL. | | Please see the user guide for complete details: | | http://ellislab.com/codeigniter/user-gui...uting.html | | ------------------------------------------------------------------------- | RESERVED ROUTES | ------------------------------------------------------------------------- | | There are two reserved routes: | | $route['default_controller'] = 'indexPage'; | | This route indicates which controller class should be loaded if the | URI contains no data. In the above example, the "welcome" class | would be loaded. | | $route['scaffolding_trigger'] = 'scaffolding'; | | This route lets you set a "secret" word that will trigger the | scaffolding feature for added security. Note: Scaffolding must be | enabled in the controller in which you intend to use it. The reserved | routes must come before any wildcard or regular expression routes. | */ $route['default_controller'] = "IndexPage"; $route['scaffolding_trigger'] = ""; /* End of file routes.php */ /* Location: ./system/application/config/routes.php */ here is the config: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* |-------------------------------------------------------------------------- | Base Site URL |-------------------------------------------------------------------------- | | URL to your CodeIgniter root. Typically this will be your base URL, | WITH a trailing slash: | | http://example.com/ | */ $config['base_url'] = "http://www.revolutionchiros.com/"; /* |-------------------------------------------------------------------------- | Index File |-------------------------------------------------------------------------- | | Typically this will be your index.php file, unless you've renamed it to | something else. If you are using mod_rewrite to remove the page set this | variable so that it is blank. | */ $config['index_page'] = "index.php"; dont know what is going on?
[eluser]sketchynix[/eluser]
That looks alright to me. Do you have a .htaccess file setup on the production server?
[eluser]dirty[/eluser]
i dont. could that be stopping it from routing properly? or does CI require one?
[eluser]sketchynix[/eluser]
I am guessing that there is a mod_rewrite rule on the server that isn't on your localhost. It would be in the .htaccess file. I could be entirely wrong, but it is something to check
[eluser]Jônatan fróes[/eluser]
Test your $config['uri_protocol'] with other options: Code: /*
[eluser]joedy[/eluser]
Yea you gotta try what Jônatan fróes suggested. try to change $config['uri_protocol'] = "AUTO" to another one such a "PATH_INFO" or "QUERY_STRING", or "REQUEST_URI", or "ORIGINAL_PATH_INFO" usually I use "REQUEST_URI" good luck
[eluser]dirty[/eluser]
have not had any luck with the changes above. would i need an ht access file on dreamhost to get this working properly? thanks! |
Welcome Guest, Not a member yet? Register Sign In |