簡體   English   中英

部署在子域中Apache服務器上的CodeIgniter-重定向循環

[英]CodeIgniter deployed on an Apache server in a subdomain - Redirect Looping

我正在將codeigniter應用程序部署到由第三方apache服務器托管的子域上。 訪問頁面時,它會不斷刷新,然后瀏覽器告訴我正在發生重定向循環。 我知道它與Apache conf設置和我使用的自定義.htaccess文件有關,但我不知道如何解決它。

當前的.htaccess代碼:

RewriteEngine on

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

嘗試另一個.htaccess

RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]

如果不是,請嘗試將最后一行更改為

RewriteRule ^(.*)$ /index.php/$1 [L]

另外,請確保已將config.php中'' $config['index_page']設置$config['index_page'] ''

暫無
暫無

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

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