2011-01-05 69 views
0

在本地主機中一切正常,但我有一個問題登錄從其他瀏覽器,如safari和鉻,在Firefox中確定。可能是因爲htaccess或可能是其他。我試了很多搜索,但沒有解決。我的htaccess文件看起來像這樣。codeigniter問題通過IE,Safari,Chrome登錄?

<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。 有幫助嗎?

+0

這些代碼與您的登錄/表單/過程有什麼關係?需要更多的代碼或在這裏...或者你想讓我們猜測? – Jakub 2011-01-05 04:30:00

+0

它在localhost上正常工作。這意味着它可能是htaccess的問題。 – kamal 2011-01-05 04:35:54

回答

1

您是否已更新配置文件中的base_url變量以反映新服務器?

+0

我不認爲沒有更新base_url網站將運行。 – kamal 2011-01-06 04:29:28

+0

這取決於您的網站設置方式。過去我遇到過與此相同的症狀。 – Aaron 2011-01-06 11:24:20

0

我遇到了同樣的問題。我發現的是Native session class解決方案,它幫助我克服了相同的問題。看看CI Native會話。這也適用於所有主流瀏覽器。 http://codeigniter.com/wiki/Native_session/