我想启用重写日志记录,以便可以调试重写规则,但是添加RewriteLog指令会导致500错误。
版本信息:
Ubuntu 14.04
Server version: Apache/2.4.12 (Ubuntu)
Server built: Feb 4 2015 14:22:06
内容 .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 5
RewriteBase /
RewriteRule ^/wordpress/wp-content/(.*)$ /wp-content/$1 [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
在错误日志中,我看到:
/var/www/path.to/wordpress/.htaccess: Invalid command 'RewriteLog', perhaps misspelled or defined by a module not included in the server configuration