Problems in CI online |
Hello guys,
I use CI local in my server and also in my clients. I'm making a website to use as presentation to find new customers. But I'm getting some issues. I couldnt to discovery the origin of the problem yet. My bet is the temporary address, but no sure. Hope you can help me. I am hosting at hostgator Follow some relevant snippets: .htaccess Code: RewriteEngine On config.php PHP Code: $config['base_url'] = 'http://108.167.188.23/~phpfr697/'; routes.php PHP Code: $route['default_controller'] = "login"; I am getting 404 error at index root at http://108.167.188.23/~phpfr697 When I try to go to http://108.167.188.23/~phpfr697/login manually, the page redirects to some hostgator 404 page. Thanks and sorry my bad english. I'm from Brazil and still learning.
(12-08-2014, 08:57 PM)bclinton Wrote: what if you include your project directory in your rewrite rule? So... now the / and /login are getting codeigniter 404 error (not the hostgator 404 error in /login). But still 404 error lol Thanks anyway. It's the first attempt. I ll keep searching to find a solution.
Have you tried using a blank base_url:
PHP Code: $config['base_url'] = ''; Even on a shared hosting, this should work fine. (12-08-2014, 02:25 PM)juninhodeluca Wrote: You should change $0 to $1. (12-08-2014, 02:25 PM)juninhodeluca Wrote: 'index_page' should be 'index.php'. (12-08-2014, 02:25 PM)juninhodeluca Wrote: Not an issue, but your 'login' route is kind of pointless. 'index' is the default method even if you don't set it in a route. (12-08-2014, 08:57 PM)bclinton Wrote: what if you include your project directory in your rewrite rule? Or rather, use RewriteBase. (12-09-2014, 10:46 AM)Chroma Wrote: Have you tried using a blank base_url: Please don't suggest this, an empty base_url only works so that beginner users can have close to zero configuration, but otherwise it should always be set, especially in a production environment.
I cant leave it blank since I use base_url() helper a lot in the app.
I am waiting the dns propagation to try do with no temp folder. (12-10-2014, 03:34 AM)Narf Wrote:(12-09-2014, 10:46 AM)Chroma Wrote: Have you tried using a blank base_url: I didn't know that. Why? Also, should it be a full url or relative?
So... resolved guys. Thank you all.
After the DNS propagation, I still got the 404 error. Googling a lot, noticed the point: linux based server are case-sensitive (duh!?) Sometimes I feel myself like a... nevermind hehe TY again! (12-10-2014, 11:05 AM)bclinton Wrote:(12-10-2014, 03:34 AM)Narf Wrote:(12-09-2014, 10:46 AM)Chroma Wrote: Have you tried using a blank base_url: Because you're otherwise relying on guesswork from the framework. Guesswork is never good, especially in this case where the value is static and you know it. It should be the full base URL, like shown in the config itself.
Hey man,
Did you try to change back the uri_protocol config to 'AUTO' or one of the other modes? I think 'REQUEST_URI' is almost always working on a local installation, but it can be different on some servers. Hope it helps... -Roger |
Welcome Guest, Not a member yet? Register Sign In |