2014-04-16 39 views
0

我試圖創建.htaccess文件我的.htaccess得到內部服務器錯誤

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^(.+)$index.php?url=$1 [QSA,L] 

,當我嘗試在Web瀏覽器本地主機/ MVC(MVC是我的web目錄) 我收到提示

Internal Server Error:

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Apache/2.4.6 (Ubuntu) Server at local host Port 80

+0

是'啓用rewrite'模塊? –

+0

是的,重寫模塊已啓用 –

+0

檢查您的Apache錯誤日誌。我的猜測是你錯過了['FileInfo'覆蓋](http://httpd.apache.org/docs/current/mod/core.html#allowoverride) – Phil

回答

0

設置了AllowOverride所有在httpd.conf

+0

在我的apache2.conf ** <目錄/ var/WWW /> \t選項指標的FollowSymLinks \t的AllowOverride所有 \t要求所有授權 \t從所有 <目錄/ var/WWW /> 選項指標了FollowSymLinks多視圖 的AllowOverride的FileInfo 訂單允許允許,拒絕 允許從所有 <目錄 「/無功/網絡/ MVC」> 選擇指數包括了FollowSymLinks ExecCGI 的AllowOverride所有 訂購允許,拒絕 所有 允許**,但仍內部服務器錯誤 –

+0

確保/etc/apache2/conf.d/security有COM目錄設置中的內容。 (。+)$ RewriteRule ^(。+)$ index.php?url = $ 1 [QSA,L] – rmcfrazier