Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 15 down vote accepted

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

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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