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

  • where's that server config?
    – openfrog
    Dec 21 '09 at 20:50
  • I'm not on a mac, but I think it's located at /Applications/MAMP/conf/apache/httpd.conf
    – muffinista
    Dec 22 '09 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.