Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4571386
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:29:47+00:00 2026-05-21T19:29:47+00:00

I have this route: Router::connect( ‘/:controller/*’, array(‘controller’=>’con3’), array(‘controller’=>’con1|con2’) ); I am trying to direct

  • 0

I have this route:

Router::connect(
    '/:controller/*',
    array('controller'=>'con3'),
    array('controller'=>'con1|con2')
            );

I am trying to direct every call to

/con1/x1/x2

to

/con3/x1/x2

and

/con2/y1/y2

to

/con3/y1/y2

it is not working, why ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:29:48+00:00Added an answer on May 21, 2026 at 7:29 pm

    If you require to route /con3/ to /con1/ and/or /con2/ based on your own constraints what you require is a Custom Route class. For this there is no better place than Mark Story’s tutorial on custom Route classes.

    Otherwise, you could of course just extend your controllers (and leave the body empty) like this:

    <?php
    class Con3Controller extends Con1Controller{
        // maybe add model here if you don't have
        // var $uses in Con1Controller
        // otherwise, extend is just fine
    }
    ?>
    

    In this case you don’t need to mess with connecting routes like you are right now. Object inheritance will take care of your “aliasing” for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm generating plain simple links with CakePHP's HtmlHelper the following way: $html->link(Newest, array( 'controller'
I am trying to make a simple redirector controller in CakePHP. I'd like the
I have an existing rails application to which i am adding a new controller
i have problem use link_to_remote link_to_remote document example say link_to_remote Delete this post, :update
What's the cleanest way to add a prefix to every URL in CakePHP, like
I have a problem with the routing while using the Searchable Plugin of Neil
I am attempting to create a custom route in rails and am not sure
I have a dashboard with a series of widgets. Per specification, the widgets need
A Facebook app is hosted on my server at, say, http://server.com/projects/fbapp/ , but is
Is it possible to do domain-specific routes in cakephp? for example, let's say I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.