If I'm going to redirect from the bootstrap file, are there any ZF methods available to me PRIOR to dispatching?

One example is for normalization. If somebody requests /?param=value and I wanted to redirect it to /param/value/. There is no need to go through a dispatch process, but it would be convenient to have access to the methods of the redirector. Just have it rebuild the URI from the routes and the parameters.

Another example is in my bootstrap, I setup my db connector. If this fails, I want to immediately redirect away without having to go through any other code or controllers. Dispatching probably wouldn't do any good anyways without the db.

What's the best way to accomplish this? Manually build the URL and use a standard PHP header call and exit?

Any insight is appreciated.  Thanks!

Reply via email to