EAP 6 Rewrite file conditions do not work

Solution Unverified - Updated -

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.

Environment

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

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.