我在Windows上编写我的web应用程序,并将其推送到运行Ubuntu Linux的服务器。这里是我的.htaccess文件:500内部服务器错误CodeIgniter htaccess mod_rewrite
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /SearchDatGifUbuntu/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
ErrorDocument 404 /index.php
</IfModule>
我在文件/ etc/apache2的/网站可用/默认如下:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
我输入sudo的a2enmod改写成在我的Ubuntu的命令行服务器,它说mod_rewrite已经打开。
当我通过我的笨应用程序调试,似乎是错误出现在CodeIgniter.php线308,这就是:
$CI = new $class();
可有人请让我知道是怎么回事?
尝试'AllowOverride FileInfo'而不是'Require all granted',http://stackoverflow.com/a/22526144/661872 –