我已經建立了一個服務器在我的Mac(OSX 10.9),但它返回一個500錯誤,在錯誤日誌以下消息...500錯誤Apache服務器上 - 有「AllowOverride這裏不允許」
[alert] [client ::1] /Users/user/Sites/mysite/.htaccess: AllowOverride not allowed here
下面是我的.htaccess文件
Options +FollowSymLinks -MultiViews
AllowOverride All
# Turn mod_rewrite on
RewriteEngine On
RewriteBase/
RewriteMap lc int:toLower
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule (.*) ${lc:$1} [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^i/(.*)/(.*)-(.*)$ /items/?id=$1&range=$2&type=$3 [L,QSA,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^c/(.*)$ /category/?menu=$1 [L,QSA,NC]
代碼下面是相關的httpd.conf代碼(讓我知道如果有別的,這將有助於)
DocumentRoot "/Users/user/Sites/mysite"
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
</Directory>
<Directory "/Users/user/Sites/mysite">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
任何想法?
從''.htaccess'文件中取出'AllowOverride'指令。它只允許在''部分 –
2013-11-22 20:54:37