2 Replies Latest reply on Aug 20, 2012 5:14 AM by tb7032

    Dispatcher filters & mod_rewrite


      I was working on an issue yesterday, and realised it was caused by an error in the Dispatcher filters.


      The developer had (understandably) expected the Filters to 'see' the URL passed down from preceding handlers (ie mod_rewrite). However, as described in the documentation, this is not the case:


      Since Dispatcher 4.0.11 it is no longer necessary to set DispatcherUseProcessedURL 1 (in httpd.conf when using with Apache).

      The filter section will always be applied to the unprocessed, sanitized URL, as received by the web server.


      This got me thinking - is this really the behaviour we'd want from Dispatcher?


      Doesn't it force us to open filters wider than we really need to... for example, if you were to follow the technique described in the link below  (effectively resolving mapped content paths in the Apache using mod_rewrite) you'd still have to Allow * as the filters wouldn't be applied to the resolved content paths (ie /content/mysite/...).

      http://dev.day.com/content/kb/home/cq5/CQ5SystemAdministration/HowToFlushMappedContent.htm l


      If the filters worked on the processed URLs you could allow /content/mysite/* which seems a lot neater to me.


      Does anybody else thing this seems a bit odd? Am I missing something (ie a good reason for it to work in this way)?