Roll your own Apache Rewrite Log

.htaccess made easy

Roll your own Apache Rewrite log! Rocking your own rewrite log is super-helpful for testing .htaccess rewrite rules, WordPress permalinks, etc. For more information, check the source.

Rewrite log via http.conf

Twist one up via the Apache configuration file by placing this code at the foot of your http.conf (remember to edit the path):

# Roll your own Rewrite log
# Log details via scale of 1 to 9
# 1 = few details, 5 = enough details, 9 = too much detail
RewriteEngine On
RewriteLog "/absolute/path/to/your/wwwroot/public_html/rewrite.log"
RewriteLogLevel 5

via htaccess

..doesn’t work.


Here is an example indicating the type of data logged by the RewriteLog directive: - [07/July/2007:07:07:07 - 0700] [][rid#800b7a33/initial] (2) init rewrite engine with requested uri /press/wp-comments-post.php - [07/July/2007:07:07:07 - 0700] [][rid#800b7a33/initial] (2) rewrite /press/wp-comments-post.php -> - [07/July/2007:07:07:07 - 0700] [][rid#800b7a33/initial] (2) explicitly forcing redirect with - [07/July/2007:07:07:07 - 0700] [][rid#800b7a33/initial] (1) escaping for redirect - [07/July/2007:07:07:07 - 0700] [][rid#800b7a33/initial] (1) redirect to [REDIRECT/301]