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.

Is it possible to make an entry in a logfile whenever Apache does a certain redirect? I'd like to be able to keep track of which users used the URL that is being redirected from.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

From http://httpd.apache.org/docs/current/mod/mod_rewrite.html

RewriteLog Directive

Description: Sets the name of the file used for logging rewrite engine processing

Syntax: RewriteLog file-path

Context: server config, virtual host

Status: Extension

Module: mod_rewrite

The RewriteLog directive sets the name of the file to which the server logs any rewriting actions it performs. If the name does not begin with a slash ('/') then it is assumed to be relative to the Server Root. The directive should occur only once per server config.

share|improve this answer
add comment

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.