.htaccess / apache problem in URI routing? |
[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
[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
[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:
[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.
[eluser]Colin Williams[/eluser]
It's not at all a CI issue, it is an issue with your mod_rewrite setup.
[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! :-)
[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
[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.
[eluser]taewoo[/eluser]
Hey SitesByJoe. Thanks but that doesn't seem to solve the problem... ;/ |
Welcome Guest, Not a member yet? Register Sign In |