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?

link|improve this question

50% accept rate
feedback

1 Answer

up vote 5 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

link|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
feedback

Your Answer

 
or
required, but never shown

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