![](/img/trans.png)
[英].htaccess Internal Server Error: ErrorDocument not working (RewriteEngine on)
[英]RewriteEngine On - Internal Server Error
我在Linux服務器上有問題。
配置:Linux服務器3.2.0-4-686-pae#1 SMP Debian 3.2.65-1 + deb7u2 i686
Apache / 2.2.22(Debian)
PHP / 5.4.39-0 + deb7u2
ModRewrite已打開(a2enmod)
我的htaccess看起來像:
<IfModule mod_rewrite.c>
Options -MultiViews +SymLinksIfOwnerMatch
#RewriteEngine On
RewriteBase /var/www/git
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L,NC]
</IfModule>
<Files config.ini>
order allow,deny
deny from all
</Files>
當我取消注釋#RewriteEngine時,出現內部服務器錯誤
Me網站-在Apache中可用:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/git
ServerName git.server.com
Alias /git /var/www/git
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 5
<Directory /var/www/git>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
您有解決問題的想法嗎? 謝謝
解決了將/ var / www / git替換為/
無論如何,謝謝你的建議。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.