的.htaccess爲什麼base_url()返回無效的url?
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
控制器
<?php
class Home extends CI_Controller
{
function index()
{
echo base_url();
}
} ?>
配置 $配置[ 'BASE_URL'] = ''; $ config ['index_page'] ='';
輸出
我有網址助手已經加載。它應該是http://localhost/ci/
請幫助我。
刪除'從第一線的RewriteCond system'。 – Tpojka