I am trying to integrate Wordpress with my Zend application using a plugin and it is working quite well except for one thing: the base url. My wordpress plugin calls my integration function inside my application's bootstrap from /myapplication/libray/wordpress. Therefore, the request base url is set to this value for the entire application. I would like to fool Zend into thinking that the request was dispatched from /myapplication/public so that it can detect the base url accordingly. Of course, $request->setBaseUrl('/myapplication/public') would be the easy way, but that would bug me on the production side where the blog will be hosted on blog.myapplication.com and where the base url will be mapped to / and will not pose problem. I don't want to hack around and put conditionals based on application environment.
Is there an elegant way to do this. I tried playing around with the request object and $_SERVER variables such as REQUEST_URI, SCRIPT_NAME SCRIPT_FILENAME PHP_SELF but I can't seem to be able to make it work. Maybe I need to use a Route object, and if so, could someone explain me how since I don't seem to have the greatest grasp on understanding the concept in this situation.