2012-02-16 78 views
5

我笨工作本地主機上,但在live.my笨不行的最新version.i也儘量older.it總是告訴我網頁重定向沒有找到。笨不是在活頁很好地工作未找到錯誤的服務器

routes.php文件設置爲

$route['default_controller'] = "home"; 
$route['404_override'] = ''; 

我還上載server.i htaccess的在Linux和窗口都嘗試。

htaccess的

RewriteEngine on 
RewriteCond $1 !^(index\.php|resources|robots\.txt) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?/$1 [L,QSA] 
+0

如何是你的本地和遠程的htaccess線'RewriteBase /'? – Gerep 2012-02-16 17:30:27

+0

是的,請發佈你的'.htaccess'。 – bottleboot 2012-02-16 17:32:28

+0

htaccess的在我的question.please更新檢查這個 – 2012-02-16 18:01:44

回答

2

,你可以這樣做:

$config['base_url'] = 'http://'.$_SERVER['HTTP_HOST']; //you can also leave blank this CI tend to find this by himself 
$config['index_page'] = ''; 

$config['uri_protocol'] = 'AUTO'; //if not working try one of these: 
    'PATH_INFO'  Uses the PATH_INFO 
    | 'QUERY_STRING' Uses the QUERY_STRING 
    | 'REQUEST_URI'  Uses the REQUEST_URI 
    | 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO 

,並嘗試這個.htaccess我用很多網站

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

,如果沒有工作,使用phpinfo();和檢查mod_rewrite的是enabled

相關問題