我想在Godaddy主機上載我的代碼點火網站。 但得到404頁未找到錯誤。在Godaddy主機上設置CodeIgniter網站
項目結構
根/的public_html /項目
我想在www.site.com/project
我.htacess文件訪問項目
RewriteEngine On
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
在config.php重要的事情
$config['base_url'] = '';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = FALSE;
在路線的重要事項提交
$route['default_controller'] = 'main';
我已經試過很多.htacess文件和配置的修改,但不能將問題整理出來。請幫助
如果所有的codeigniter文件都在/ project目錄下,你的htaccess需要知道我的想法。嘗試將最後一行更改爲project/index.php – Bryan
項目是主codeigniter項目文件夾,其工作在localhost上。 順便說一句,我試過了,還沒有修復錯誤 –
嘗試換行到'RewriteRule ^(。*)$ index.php?/ $ 1 [L]'(注意問號)。 – Tpojka