I have an .htaccess which looks like this:

RewriteEngine on
RewriteLog "/Applications/MAMP/logs/rewrite_engine_log"

RewriteCond %{REQUEST_URI} !/(index.php|css|images|js)/.*$
RewriteRule (.*) /mysite/index.php/$1

When I add that RewriteLog directive, I get an Internal Server Error.

In the Apache log files I get this info:

/Applications/MAMP/htdocs/mysite/.htaccess: RewriteLog not allowed here

I did not create that rewrite_engine_log file manually, but that path /Applications/MAMP/logs/ exists on my mac. What can I try next to get RewriteEngine logfiles?


It pretty much means what it says. You can't put a RewriteLog directive in an .htaccess file. If you need it, your only option is to put it in the server config or in a virtual host's config section:

apache's mod_rewrite man page