Ajax vs. URL manager

Hi. So i have one problem with creating ajax-based website.

In order to enable back button and history on this website, i need to form custom urls manually. I choosed BBQ library for this task, cuz it’s integrated into Yii Framework. As far as i know, the one and only possible way to change url “on the fly” is to change it’s “hash” e.g. the part after # sign. So, common practice is to have url’s like this:

Now there is few problems with such approach. Seems like "url manager" is ignoring hashed part of url. When you pass aaa.aa/#/post/show/, framework shows you aaa.aa/ page - default controller and default action. Ofcource, i can put all the functionality into SiteController/index action, but this is not the most elegant way of using Yii, i think. Is there some way to keep controller/action architecture when creating full-ajax websites?

Any information after the hash “#” is never sent to the server. So there’s also no way for Yii to know about these parameters. You have to solve that on the client side.