codeigniter问题通过IE,Safari,Chrome登录?

时间:2011-01-05 03:48:11

标签: .htaccess codeigniter web-hosting

在localhost中一切正常但我在登录其他浏览器时遇到问题,比如safari和chrome,在firefox中就可以了。可能是因为htaccess或可能是其他的。我尝试了很多,但没有解决方案。我的htaccess文件看起来像这样。

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /


RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

我的服务器文件夹hirarchy看起来像这样

public_html
L application
  system
  css
  images
  .htaccess

application / config / config.php看起来像这样

$config['index_page'] = "index.php?";
$config['uri_protocol'] = 'QUERY_STRING';

我也使用过hmvc。 有什么帮助吗?

2 个答案:

答案 0 :(得分:1)

您是否更新了配置文件中的base_url变量以反映新服务器?

答案 1 :(得分:0)

我遇到了同样的问题。我发现的是Native会话类解决方案,它帮助我克服了同样的问题。看看CI Native会话。这也适用于所有主流浏览器。 http://codeigniter.com/wiki/Native_session/