Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.