![]() |
.htaccess / apache problem in URI routing? - 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: .htaccess / apache problem in URI routing? (/showthread.php?tid=15412) |
.htaccess / apache problem in URI routing? - El Forum - 02-03-2009 [eluser]taewoo[/eluser] Hi everyone. I made an app.. which I uploaded to a shared hosting service provider. I noticed that ALL HTTP requests, regardless of URI, is coming as if they're ignored.. in another words http://server.com/page/some_where is exactly same as http://server.com/.... this is true of ANY requests. I am not certain why this is happening because I am using same index.php and .htaccess as my previous CI apps. From what I can tell.. the database is loading correctly and the front page controller is loading. Can someone give me an insight into this? Here's my .htaccess Code: <IfModule mod_rewrite.c> And my index.php (pretty standard CI index.php.. i just removed the comments) Code: <?php .htaccess / apache problem in URI routing? - El Forum - 02-04-2009 [eluser]taewoo[/eluser] I think i found my own solution.. For some reason, it'll work on my host if i add a '?' to this line Code: RewriteRule ^(.*)$ index.php?/$1 [L] Could this be an Apache version issue? my host's apache version is Apache version is 2.2.11 .. mine is 2.2.6 .htaccess / apache problem in URI routing? - El Forum - 02-16-2009 [eluser]Flemming[/eluser] this solution worked for me too. I've just moved a site from Apache 1.3.7 to 2.2.11 all my urls were pointing back to the index (every page was displaying as the home page) - adding a '?' after index.php got it working. Alternatively, changing [L] to [R] at the end of the rewrite rule had the same fixing effect but of course the uri displayed as the mod rewritten version, e.g. www.mysite.com/index.php/controller still wondering why... :long: .htaccess / apache problem in URI routing? - El Forum - 02-16-2009 [eluser]taewoo[/eluser] [quote author="flemming" date="1234809262"]this solution worked for me too. I've just moved a site from Apache 1.3.7 to 2.2.11 [/quote] DAMN. 1.3.7? What did you program in? Assembly language? ;P [quote author="flemming" date="1234809262"] still wondering why... :long:[/quote] I don't know. And it seems like folks @ EE aren't really paying attention to the forum posts either. .htaccess / apache problem in URI routing? - El Forum - 02-17-2009 [eluser]Colin Williams[/eluser] It's not at all a CI issue, it is an issue with your mod_rewrite setup. .htaccess / apache problem in URI routing? - El Forum - 02-17-2009 [eluser]Flemming[/eluser] Absolutely Colin - I should have said at the end of my post that it was kind of rhetorical - I realise that it is NOT a CI issue! :-) .htaccess / apache problem in URI routing? - El Forum - 02-17-2009 [eluser]taewoo[/eluser] [quote author="Colin Williams" date="1234881955"]It's not at all a CI issue, it is an issue with your mod_rewrite setup.[/quote] Ditto on Flemming. We need help with mod_rewrite.. not CI .htaccess / apache problem in URI routing? - El Forum - 02-17-2009 [eluser]SitesByJoe[/eluser] I concur that it's your mod_rewrite. Here's what I use. Code: <IfModule mod_rewrite.c> Almost the same, but the order of the lines does make a difference - I run the file checks first. .htaccess / apache problem in URI routing? - El Forum - 02-17-2009 [eluser]taewoo[/eluser] Hey SitesByJoe. Thanks but that doesn't seem to solve the problem... ;/ |