Hello, I have a question...

I want my application to react differently based on the url typed or clicked
by the user. 
And I want it to check to three different possibilities:

1) Does the url correspond to a valid (an existing) module/controller/action
combination, 
even if the word "default" is omitted for the default module? Then dispatch
it.

For example: www.example.com/module/controller/action
             www.example.com/controller/action (default module)

2) If that combination does not exist, look at a database whether the piece
of the url after 
"www.example.com" corresponds to a section of the website... If true,
dispatch a 
controller/action that shows this section of the site.

For example: www.example.com/sub1/subsub1/subsubsub3/subsubsubsub1

3) If not, look at a database if the piece of the url after
"www.example.com" corresponds 
to the username of a user and, if so, show his/her profile.

For example: www.example.com/profile34

4) If not, show an error.

How can I do that? Where should I do that?
-- 
View this message in context: 
http://www.nabble.com/A-router-that-reacts-to-three-different-possibilities...-tp25722083p25722083.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to