Welcome Guest, Not a member yet? Register   Sign In
CI not called when using mod_rewrite with PHP5 running as cgi
#18

[eluser]david_ais[/eluser]
I've finally got to the bottom of this. As suspected it was a server configuration issue at the ISP.

It turns out that when running PHP5 and following an internal redirect via mod_rewrite, their server is not configured to handle a URL in the form /script.php/parameter but it is able to handle it if the URL is in the form script.pgp?parameter - even though both versions of the URL would work if typed directly into the browser.

So in fact Sarfaraz Momin's last suggestion was in the right direction - though till the ISP came clean about their server I'd probably have still struggled to get there. The ISP kept insisting on blaming CI instead of looking at the available evidence!


The solution came down to changing:

Code:
RewriteRule ^(.+)\.html$ /index.php/$1 [L]
  to
RewriteRule ^(.+)\.html$ /index.php?$1 [L]
And switching $config['uri_protocol'] from REQUEST_URI to QUERY_STRING or AUTO

Replacing most of the mod_rewrites with entries in routes does tidy things up and I'll definitely do that. But it doesn't eliminate the problem as there'll still be that one RewriteRule to map out index.php from the URL that would still trigger the problem.

So - problem solved. Thanks for everyone's input on this.


Regards

db


Messages In This Thread
CI not called when using mod_rewrite with PHP5 running as cgi - by El Forum - 11-07-2007, 07:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB