Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

AEM: debugging Apache rewrite rules on dispatcher | AEM Community Blog Seeding

Community Manager
Community Manager


AEM: debugging Apache rewrite rules on dispatcher by Jeroen DruwÃ


On my current project, we have many Apache rewrites rules configured. I recently discovered an issue in one of our rules that caused our product pages not to render correctly. It can be quite cumbersome to check every single rule, I went looking for a better solution and found one: mod_rewrite logging using the LogLevel directive.

Within your  directive
LogLevel alert rewrite:trace3

mod_rewrite offers detailed logging of its actions at the trace1 to trace8 log levels. The log level can be set specifically for mod_rewrite using the LogLevel directive: Up to level debug, no actions are logged, while trace8 means that practically all actions are logged. Using a high trace log level for mod_rewrite will slow down your Apache HTTP Server dramatically! Use a log level higher than trace2 only for debugging!
tail -f error_log | fgrep '[rewrite:'

Can for example result in the following:
[rewrite:trace3] mod_rewrite.c(470): applying pattern '^/nl-be/products/([0-9]+)(/.+)?' to uri '/nl-be/products/1234.html'
[rewrite:trace2] mod_rewrite.c(470): rewrite '/nl-be/products/1234.html' -> '/content/company/be/nl.pdp.1234'

Read Full Blog

AEM: debugging Apache rewrite rules on dispatcher


Please use this thread to ask the related questions.


Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies