But here is the problem: I was trying to do this with the Zend routing class on a site that was already configured at setup with all its routing rules. Originally I tried just prepending 'test/' to all of the existing rules but that caused more complications than I had time to fix. I tried Googling a quick fix for this but could find nothing other than how to reroute one rule to another or forward to another controller. While it was useful information and I may need it in the future it was unrelated to my issue.
What I ended up doing was digging through the Zend_Controller_Front class to see what I could find. And voila I came across a class variable _baseUrl. Looking through the class methods I quickly found the setBaseUrl() method. After smacking myself on the head for not thinking of this earlier I then set called the already set controller class to call
Zend_Controller_Front::setBaseUrl('/test/');And like magic the Zend controller started recognizing all my URL's that were prepended with '/test/'.
Hope this saves someone else a couple hours of searching.
No comments:
Post a Comment