1 Reply Latest reply on Feb 10, 2009 12:29 AM by Luis Majano

    Problems and questions with the rewrite valve

    Luis Majano Newbie

      I finally understood how to make the valve work since for some reason by putting a context.xml within my webapplications META-INF folder was NOT working. I then created a $CATALINA_HOME/conf/Catalina/localhost/railo.xml so it could finally read it. Anyways, it reads the valve and loads my rewrite.properties file from within my applications WEB-INF folder. Sample Rules:

      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.cfm/%{REQUEST_URI} [QSA,L]

      This works like a charm in mod_rewrite and according to the valve's docs, this is completely legal and good rewrite. I check the catalina logs and it says that the rules get loaded. Ok good. Now I go to any app and do my SES link. Example:

      /TestApp/index.cfm is where the template is.

      I then run /TestApp/general/page and jboss web just throws a 404 error. There are no traces of rewriting, no way for me to know if a rewrite was taking place or NOTHING. So debuggin on pure air is well, just hard.

      How can I know if the valve is rewriting correctly? Any way to get the valve to log its activities? To tell you the truth. Mod_rewrite is leagues beyond the valve in terms of docs, ease of use and logging. I would suggest updating the valve to include per-application logging.