I’ve been thinking about unit testing rewrite rules recently, while deploying a multi-site instance of Mephisto.
Until then, you can debug your rewrite rules using the RewriteLog directive:
RewriteLog "/myfolder/mylogfile.log"
RewriteLogLevel 3Please note that:
- it can slow down your server a lot
- you should not leave this in production for long (even with RewriteLogLevel set to 0 — instead, remove both directives)
If you want to learn more, see the mod_rewrite RewriteLog documentation.