2012-02-16 79 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

相关问题