bellashaye wrote:
> Sorry for the late reply..thank you for your reply!
> 
> Unfortunately I do not have the option to have a constant namesppace after
> the domain. That would make things so much easier though!
> 
> Is it possible to set up some type of redirect or check to see if a folder
> does not exist to send it to a specific controller. That controller would be
> able to look at the URL the user entered and take the /johnsmith part from
> the url and run it through a database check?
> 
> I guess in a way it would be something like the Error Controller...
> 
> Thanks again!

Could you add a "catch all" route, something like:

new Zend_Controller_Router_Route_Regex('([^/]*)', array(
                'controller' => 'index',
                'action' => 'replicatedwebsite',
            ), array(1 => 'user'), '%s');

If you placed that last in your stack it should match

http://example.com/johnsmith and pass it to index controller,
replicatedwebsite action with the param user = johnsmith.

You can then do your database checks in the controller, and if the user
doesn't exists throw a 404 exception:

throw new Zend_Controller_Action_Exception('User Not Found', 404);

and let the error handler deal with it as normal.

-- 

Brenton Alker
PHP Developer - Brisbane, Australia

http://blog.tekerson.com/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to