2011-12-18 37 views
0

不工作,我得到以下錯誤,而建立生產服務器上mode_rewrite:試圖使用ErrorDocument來處理請求時遇到笨 - mod_rewrite的在生產服務器

404 Not Found錯誤。

我在應用程序文件夾外有index.php,所以我設置路徑爲$ application_folder & $ system_path。

我的文件夾結構:!

folder_A: 
    folder_A1: 
     index.php 
     js 
     css 
    folder_A2: 
     application 
     system 

這裏是htaccess的,在folder_A1

RewriteEngine敘述上
的RewriteCond%{} REQUEST_FILENAME -f
的RewriteCond%{} REQUEST_FILENAME -d
RewriteRule ^(。*)$ index.php/$ 1 [L]

我給了$ config ['index_page'] ='';

我試過RewriteBase'/'以及'路徑/到/應用程序',但徒勞無功。

您能否找到解決方案?

回答

0

您是否有權在.htaccess文件中配置重寫規則?我的CI應用程序的.htaccess中的規則完全相同,並且工作正常。你的apache配置文件中是否有類似AllowOverride ALL的行?

0

據我所知,您的CI文件夾結構應該是這樣的與mod_rewrite的工作:

root/.htaccess 
root/index.php 
root/assets/js 
root/assets/css 
root/assets/img 

root/application 
root/system