2011-12-18 38 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