![]() |
URI + Routing Issues - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: URI + Routing Issues (/showthread.php?tid=42567) |
URI + Routing Issues - El Forum - 06-10-2011 [eluser]Unknown[/eluser] I have a fully working site on CI2 running on MAMP. I have since uploaded it to two different hosts, both have the same issue. The homepage, styles, and scripts load fine, but any other page does not work. The .htaccess Code: <IfModule mod_rewrite.c> The application/config/config.php file: Code: $root = "http://".$_SERVER['HTTP_HOST']; ...So I have turned the logs on and here's what I get for the homepage where all is fine: Quote:DEBUG - 2011-06-10 21:03:18 --> Config Class Initialized And, then right below where I requested a URI defined in routes.php: Quote:DEBUG - 2011-06-10 21:11:33 --> Config Class Initialized Just to re-iterate, everything works fine, but when put on a different host only the home page with no URI works. I have tried this on two different hosts, (one of them is at work, another at 1and1) I have tried tons of different configurations with the .htaccess file and the config file, but I can't seem to get it working. I always get the CodeIgniter custom 404 page for anything with a URI. (well with some configurations of the $config['uri_protocol'] and Rewrite rules I would get the server default 404, but where I am now with the code above I get the CI 404 error). Any help would be greatly appreciated. Thanks! URI + Routing Issues - El Forum - 07-27-2011 [eluser]Onema[/eluser] Any updates on this? URI + Routing Issues - El Forum - 07-27-2011 [eluser]Unknown[/eluser] [quote author="Juan Torres" date="1311829607"]Any updates on this?[/quote] I have no idea where things went wrong, but I downloaded a new copy of CI started from scratch and there were a couple people who took a look at the httpd.conf and other server settings. So We have no way of tracing what went wrong, but the new build I have is working now with the multi-host setup, I have not tried it on 1and1 again as there was no need. I suspect it was a mod_rewrite issue as my new .htaccess file is much more concise: Code: RewriteEngine on URI + Routing Issues - El Forum - 07-28-2011 [eluser]Onema[/eluser] Hey thank you for the reply. After much frustration, I did just what you did and started with a new copy of CI. I added files one by one and tested. Using this method I figure out that in 1and1 the URI is case sensitive (and yes it is a LINUX server!). So if the class name for the controller is Login, I must access it like this mysite.com/Login/ and not mysite.com/login/. I really don't understand. I'm still not sure how I'm going to solve this issue... |