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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

AEM Dispatcher filter - how to make case insensitive?


Level 2

Hi I'm sure this question must have been answered or explained somewhere but I've not found it yet

The Adobe product pages explain Configuring Dispatcher.  I'd like to filter out requests based on file extension similar to the example in the documentation,

Example filter: Using Regular Expressions

This filter enables extensions in non-public content directories using a regular expression, defined here between single quotes:


/005  {  /type "allow" /extension '(css|gif|ico|js|png|swf|jpe?g)' }

I'd like our rule to be case insensitive, so that files uploaded, with naming such as 'foo.jpg', 'foo.JpeG' and 'foo.JPG' are all allowed by a filter rule like this.  As it's a regular expression, I would expect to be able to amend the regex example to '(css|gif|ico|js|png|swf|jpe?g)/i' but this doesn't seem to work.

Does anyone know how to make this extension rule case insensitive?

8 Replies


Community Advisor


I am not sure if below is helpful in your case, worth to give a try.

Mastering the AEM Dispatcher Part 2: Case Insensitive URLs


Level 2

Thanks @Arun Patidar

I've seen the (excellent) blogs you linked to, but those concern the Apache mod_rewrite module.  I'm working in the dispatcher.any file  (i.e. configuring Apache mod_dispatcher).

The Adobe filter documentation (see my link above) says

so I hoped a simple tweak to the regex "...defined here between single quotes..." would make the filter ignore case.  But my suggestion above doesn't work.  How do I write a dispatcher.any filter that ignores case?


Community Advisor


I am not sure how to do that, I am unable to test in my machine but you can try below if helps




Level 2

thanks for your suggestions Arun Patidar

My reading of the documentation's "...regular expression, defined here between single quotes..." was that the regex literally had to be 'between...quotes' but i gave your suggestions a try nevertheless (presumably you saw what i said I had tried in the original question above?).

Unfortunately neither of those worked.


Employee Advisor

As suggested I would just convert all extensions to lowercase using mod_rewrite. Although the dispatcher might support regular expressions, I don't assume that it will support all modifiers you are used from the PCRE.



Level 2

Thanks @Jörg Hoh

I'm not looking to support all modifiers from the PCRE just this one (case-insensitivity)  and as a starting point, if I can avoid having to maintain configuration in two different places to achieve one thing, then I would rather do that.

As a follow-up question, do you know where can I reference exactly what flavour of regex the dispatcher does support?



Level 2

If i can't pin down a regex case insensitive flag for the Dispatcher, amending the filter's regex to something like the following seems to work, (though it's not particularly readable)


Level 3

I am disappointed to see the dispatcher still does not allow for case insensitive extensions.  Or at least on v4.3.3 which is what I am using. @joej47544984   Can you share your regex?  I don't see it in the post above.