簡體   English   中英

htaccess文件在服務器上不起作用,並且在localhost上工作時重定向不正確

[英]htaccess file not working on server and redirecting not properly while working on localhost

我正在服務器上設置一些東西,

http://adamcyber.net/talentmasterdemo/

如果我復制數據庫和應用程序並將其運行到localhost,則可以通過將配置更改為localhost設置(如路徑和子目錄)來正常工作。 但是,當我將其上傳到服務器adamcyber.net時。 登錄頁面工作正常,但是當我使用憑據登錄時。 它進入重定向的無限循環。 所以firefox顯示錯誤。 我直到現在才發現這是htaccess的問題,但是我不確定htaccess是否在localhost上運行而不在服務器上運行。配置為正確運行htaccess,所以在與其他站點一樣運行htaccess時沒有問題服務器正在正確運行htaccess。 以下是htaccess文件代碼。

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule    (.*) index.php/$1 [L]

我被困在這里。 任何幫助將不勝感激。

試試這個

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM