我正在測試gocart(http://gocartdv.com/),我已經將它安裝在一個名爲vine-cart的子文件夾中,http://www.icas-v.org/vine-cart。CodeIgniter控制器沒有加載並給出404錯誤
默認控制器加載正常,但其餘控制器返回錯誤404消息。我仔細研究了所有類似的問題和可能的解決方案,實施了它們,但它們似乎並不奏效。
請在我的配置設置來看看:
/------------------------------- - | .htaccess文件設置| ---------------------------------/
RewriteEngine On
RewriteBase /vine-cart
### Canonicalize codeigniter URLs
# If your default controller is something other than
# "welcome" you should probably change this
RewriteRule ^(cart(/index)?|index(\.php)?)/?$/[L,R=301]
RewriteRule ^(.*)/index/?$ $1 [L,R=301]
# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]
###
# Removes access to the system folder by users.
# Additionally this will allow you to create a System.php controller,
# previously this would not have been possible.
# 'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# Without mod_rewrite, route 404's to the front controller
ErrorDocument 404 /index.php
</IfModule>
/--------------------------------- | Config.php設置| ----- ----------------------------/
$config['base_url'] = 'http://www.icas-v.org/vine-cart/';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
/--------------------------------- | routes files settings | ----- ----------------------------/
$route['default_controller'] = "cart";
//this for the admininstration console
$route['admin'] = 'admin/dashboard';
$route['admin/media/(:any)'] = 'admin/media/$1';
我一直試圖調試這幾天。請幫忙。
錯誤日誌中的任何內容?你想要什麼網址?你得到的URL是什麼?前兩個RewriteRule在做什麼? http://ellislab.com/codeigniter%20/user-guide/general/urls.html>刪除index.php – stormdrain
如果你在最後一個RewriteRule上添加一個/之前的index.php會怎樣? –