我剛剛創建了我的服務器,我需要使用.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