开发者

Codeigniter, OpenID and .htaccess

开发者 https://www.devze.com 2023-01-08 05:46 出处:网络
I\'m trying to use Codeigniter OpenID library and everything work fine with default configuration of CI without .htaccess.

I'm trying to use Codeigniter OpenID library and everything work fine with default configuration of CI without .htaccess.

When I re开发者_运维百科move 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消