我刚刚创建了我的服务器,我需要使用.htaccess文件,其中一个工作,另一个没有工作......显然,对于.htaccess工作,您需要启用AllowOverride,所以我做了下:/etc/apache2/sites-available/default
改变了这个:Ubuntu 12.04 AllowOverride全部引发内部服务器错误
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
要这样:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
当我重新启动Apache我的整个网站现在抛出错误500 Internal Server Error
我的.htaccess文件包含这个:
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
任何人有任何想法为什么?
你有你的htaccess的东西吗? – 2014-09-06 21:03:01
是的,对不起,刚添加它! – Shepard 2014-09-06 21:04:11
你是否启用** mod_rewrite **?如果你的htaccess是空的呢? – 2014-09-06 21:04:57