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

  • SEARCH
  • Home
  • 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 7981121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:16:45+00:00 2026-06-04T10:16:45+00:00

I discovered an issue with Magento routing logic and I would like to see

  • 0

I discovered an issue with Magento routing logic and I would like to see if anyone can confirm this.

Magento stacks routers admin, standard, then default and processes them one at a time. Magento gets the current module name based on the URL (see Mage_Core_Controller_Varien_Router_Standard::match()), then checks if the module should be handled by this router, based on a match to a frontName in the Magento config. If a match is found, it routes it. If not, it continues to the next router.

Config excerpt:

    <admin>
        <routers>
            <myroute>
                <use>admin</use>
                <args>
                    <module>MyNamespace_MyModule</module>
                    <frontName>myroute</frontName>
                </args>
            </myroute>
        </routers>
    </admin>
    <frontend>
        <routers>
            <myroute>
                <use>admin</use>
                <args>
                    <module>MyNamespace_MyModule</module>
                    <frontName>myroute</frontName>
                </args>
            </myroute>
        </routers>
    </frontend>
    

This means that if you use the same name for your frontend router as your admin router, the admin router will always be matched first, even on frontend pages. Your frontend page will now route as is if were an admin page, using the admin base_url, which may be different from your store’s URL causing a broken redirect.

Note that this issue is not apparent in Magento instances where the admin base URL is the same as the frontend base URL.

Can anyone confirm that my assesment of the router logic is correct here?

  • 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-06-04T10:16:46+00:00Added an answer on June 4, 2026 at 10:16 am

    This is not a Magento bug, but is something to be aware of when writing modules or working with third party code. I have clarified the issue and resolution here. Essentially, the existing adminhtml route should always be used rather than creating new admin routes. This makes urls in the admin consistent and avoids conflicts. Thank you Alan and Jared for helping me understand Magento routing better.

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

Sidebar

Related Questions

I discovered this bug while dealing with another issue. The order of JavaScript commands
Has anyone else discovered a memory leak issue with Pull Subscriptions ( ExchangeService.SubscribeToPullNotifications() )
I just discovered this issue, and I wanted to run it by everyone here
Just discovered an issue with the sorting plugin used on our cart, was working
I discovered very interested issue with XamDataGrid LoadCustomizations method. At start program I initialize
While debugging an issue with our system, I have discovered a thread contention that
An issue I discover today is similar to this unanswered problem ; though not
I discovered this quite by accident while looking for a file with a number
Hi I recently discovered an issue where people using BB Code to enter links
I recently discovered an issue where people using BB Code to enter links are

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.