Zend Route Regex: Match controller segment of Url to anything but "home" -


I am working with the URL in the following format: "Controller / Action" where slash is required.

To match the controller and action names, I need to create a PCERJX unless the name of the "home" is in the name of the controller. For example: "Member / Update" should be produced "Member", "Update"

  • "Admin / Index" should be created "Administrator", "Index",
  • "Home / index" creation gt;
  • I'm looking around, looking forward, back and around. Appreciated.

    ** Edit
    Here's a little more background. I want to set up the zend routing so that

    • a URL with only one part / foo 'Remittance of Home Controller, i.e.' / home / foo '
    • Transmission of two parts' / controller / operation' to any controller of any URL: for example, sending '/ member / update' to member controller , '/ Member / update'; & Nbsp;
    • Controller '=>' home ',' verb '=>' index ')); $ Router- & gt; Editout ('Member Route', New Zend_Controller_Router_Route ('Member /: Action', Array ('Controller' = & gt; 'Member', 'Action' => 'Index')); / / And so on, one way for each non-home controller: adminRoute, etc.

      The way I want it is working, but it's ugly and maintenance there is a problem. I want to change 'Route Route', 'Admin Routes' etc., along all the routes along with a single Reggae route: $ router-> addRoute (' siteroute ', new Zend_Controller_Router_Route_Regex ('? ?? / / action ', array (' action '= & gt;' index '), array (?? =>' controller ')));

      I am running my regex experiment with a small php script like:

         

    (?: Home. *) | ([^ /] *) (?: / (. *))?


    Comments

    Popular posts from this blog

    c# - How to capture HTTP packet with SharpPcap -

    php - Multiple Select with Explode: only returns the word "Array" -

    php - jQuery AJAX Post not working -