php - Filter before routing, and sfStopExceptions -


I would like to create a filter that runs before the routing system and thinking that this is possible.

Specifically, I want to parse and redirect the URL itself in some situations using filters. The URL required to parse using my filter will otherwise come through all the rules in my routing. IML.

What I am doing now is the first filter running in the filter. IML, but when I need to redirect to my filter there are a variety of bad things:

  1. sfStopExceptions and sfError404Exceptions are thrown anyway and clutter my logs (see this bug: ) A complete
  2. I like the bunch of lines in my logs:

    [Monday March 07 14:24:48 2011] [error] [customer] 67.184.53.79] FastCGI: Server "/ var / local / fcgi / php-cgi-wrapper.fcgi" stderr: after parsing empty module and / or action url ". /files/beezee50.png "(/), referenced: [Mon March 07 14:24:53 2011] [Error] [Customer 67.184.53.79] FastCGI: Server" / var / local / fcgi /php-cgi-wrapper.fcgi "stderr :. The verb "bezebodyshop / index" does not exist

    If I was able to successfully redirect before routing, then there should be no one from it.

    I have subclass sfPatternRouting (which is the most common sfRouting example application configured in the factories.yml file) Handle those special cases you need to address, and if not do regular work.
    You can establish your new route class in factories.yml like this:

      all: routing: category: yourAdvancedRouting Ultimate: generic_shortest_url: true extra_parameters_as_query_string: true any_other_param_you_need: value    

Comments