EAP 6 Rewrite file conditions do not work

Solution Unverified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Issue

  • The -s, -d or -f flags don't appear to work in rewrite conditions, for example:
<rewrite name="rule-1" pattern="^/app/(.*)" substitution="/app/redirect.jsp" flags="RL">
    <condition name="condition-1" test="%{REQUEST_PATH}" pattern="!-s"/>
</rewrite>
  • What I want is to return the file if it exists, if it doesn't then return index.html.

Resolution

Root Cause

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.