I'm trying to use Codeigniter OpenID library and everything work fine with default configuration of CI without .htaccess
.
When I remove index.php
by changing config.php
and .htaccess
I get 404 Page Not Found when I try to verify my openid (http://ci.dlsb.eu/test/)
Can anybody tell me where I'm wrong?
config.php
$config['index_page'] = "";
.htaccess
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Your RewriteRule
attempts to create PATH_INFO
in a per-directory context, which, from what I can tell, occurs too late in the request processing phase to work correctly.
The best solution is to simply not do this, as CodeIgniter doesn't require it to function:
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php
CodeIgniter should be able to figure out what the proper request was on its own, provided that you left $config['uri_protocol']
set to AUTO
. If not, you should set it to either AUTO
or to REQUEST_URI
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With