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

SOLVED

Advanced Dispatcher rules (eg. regex)

paro22
Level 4
Level 4

Hi,

I'm trying to add some advanced rules to the Dispatcher (4.1.9) but I'm finding myself very limited by the way patterns have to be written. [1] Is there any reason why it doesn't just use regex?

How would I implement rules like these with the current patterns?

  1. Only allow query parameters "q" and "fq". Saying /query "q=*&fq=*" allows everything because of the * I can't even say "q" OR "fq"
  2. Specify the number of characters (regex: {3}) [a-zA-Z0-9] only matches one character but I want to be able to say 'match unlimited number of this'.

In addition to these pattern issues, does anybody have resources for the new vanity url feature in 4.1.9?

[1] http://docs.adobe.com/docs/en/dispatcher/disp-config.html#Designing Patterns for glob Properties

1 Accepted Solution
Jörg_Hoh
Correct answer by
Employee
Employee

Hi,

ATM there only globs. If you need regex support for filter rules, you could implement them also on the webserver/httpd level.

kind regards,
Jörg

View solution in original post

0 Replies
kalyanar
Employee
Employee

the vanity url feature is explained here http://dev.day.com/content/ddc/en/gems/dispatcher-caching---new-features-and-optimizations.html.

1. can be done by denying every param in the first line and then allowing q in the second line and allowing fq in third line      

 2. Nt sure about 2. The regex would be [a-zA-Z0-9]+ 

 

 

 

 
Jörg_Hoh
Correct answer by
Employee
Employee

Hi,

ATM there only globs. If you need regex support for filter rules, you could implement them also on the webserver/httpd level.

kind regards,
Jörg

View solution in original post

paro22
Level 4
Level 4

Yeah, I saw the vanity url feature "explained" in the web cast, but couldn't find details anywhere. For example, where can I get the servlet that creates the vanity url list on the AEM side (the path referenced in the example doesn't exist for me)? 

 

  1. That seems awfully manual, doesn't it? Also, how do I allow unlimited number of "fq" parameters? 
  2. Yeah, with a regex that'd be easy but I don't see a way to do that with the Dsipatcher pattern.
kalyanar
Employee
Employee

For vanity urls, you would need vanityurls-1.0.1.zip.Please raise a support ticket to get this if you cant find in package share.