Hi,
My colleagues are trying to add a url rewriter rule, which basically adds a query string to the url. The rule causes the browser to keep on redirecting until it stops with an error. I added a condition to make the rule only trigger when the query string is empty, but it seems the condition is not being applied at all.
For example:
/example-rule:
jcr:primaryType: urlrewriter:advancedrule
urlrewriter:casesensitive: false
urlrewriter:isnotlast: false
urlrewriter:iswildcardtype: true
urlrewriter:qsappend: false
urlrewriter:ruledescription: ''
urlrewriter:rulefrom: /example
urlrewriter:ruleto: /example?q=value
urlrewriter:ruletype: permanent-redirect
/urlrewriter:rulecondition:
jcr:primaryType: urlrewriter:rulecondition
urlrewriter:conditionname: ''
urlrewriter:conditionoperator: equal
urlrewriter:conditionor: or
urlrewriter:conditiontype: query-string
urlrewriter:conditionvalue: ''
I also tried this:
/example-rule:
jcr:primaryType: urlrewriter:advancedrule
urlrewriter:casesensitive: false
urlrewriter:isnotlast: false
urlrewriter:iswildcardtype: true
urlrewriter:qsappend: false
urlrewriter:ruledescription: ''
urlrewriter:rulefrom: /example
urlrewriter:ruleto: /example?q=value
urlrewriter:ruletype: redirect
/urlrewriter:rulecondition:
jcr:primaryType: urlrewriter:rulecondition
urlrewriter:conditionname: q
urlrewriter:conditionoperator: notequal
urlrewriter:conditionor: or
urlrewriter:conditiontype: parameter
urlrewriter:conditionvalue: value
Why isn’t this working? Is there a recommended approach to get this to work?
Regards,
Maarten
