Note zend specifically, but the best way to do this is to add a hash lookup table before the url router does its business.
So let's say mod_rewrite converts this: mysite.com/~user
to this: mysite.com/index.php?path=~user
then you would do something like this:
$path = $_GET['path']; $url_mod = array( '~user'=>'my_other_controller', 'admin'=>'my_other_controller', ); if(isset($url_mod[$path)) { $path = $url_mod[$path]; }
dbers source share