0 Replies Latest reply on Nov 16, 2011 3:21 AM by Michael Majcen

    RewriteCond -f always true even if file does not exist?

    Michael Majcen Newbie



      We are running JBoss 4.2.3 on our production site.

      We are trying to implement a maintenance.html page.

      Our rewrite.properties looks like this:



      RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f

      RewriteCond %{REQUEST_URI} !^/maintenance.html$

      RewriteRule /SAS(.*)$ /maintenance.html [R]


      We want to link all web content named SAS* to a maintenance page IF the maintenance page exists.


      The problem is that -f option doesnt seem to twork the way I expected, when the maintenance.html file does not exist under

      .../server/deploy/jboss-web.deployer/ROOT.war/ the RewriteCond still executed the RewriteRule and redirectds to the mainteance.html which does not exist.


      Any ideas would be greatly appreciated.


      Thanks / Michael