2

This is a question that comes to me as i faced below situation:

I had an extension with front-name: "csmymodule". I changed its front-name with: "mymodule".

But I notice that both these urls work:

http://examplesite.com/csmymodule/index/abc , http://examplesite.com/mymodule/index/abc

But the same works totally opposite with Mage_Contacts module: Even here I changed its front-name from "contacts" to "contact-us", and the following page redirects me to 404 page:

http://examplesite.com/contacts

And this page works fine:

http://examplesite.com/contact-us

Why is it so? Can i do anything such that old urls do not work or redirect to the new ones as they are called? I am also curious to know how these both urls point to same page and why!

  • My guess would be that it remembers old urls for modules and redirects to the new one, perhaps until there is a conflict? Maybe search the database with phpMyAdmin to find contacts and contact-us. Perhaps it's a feature only for custom modules as the core modules shouldn't really change the routes, so they are less flexible? – LM_Fielding Sep 22 '16 at 12:36
  • This link may help you to find the reason: alanstorm.com/magento_dispatch_standard_router – Nidheesh Sep 22 '16 at 12:50
  • 1
    @LM_Fielding, Both "contacts" and "contact-us" return no results in database – Helly Sep 23 '16 at 10:55
  • 1
    i was trying to replicate the issue you mentioned but couldn't. if i change <frontName> value for a custom module the old link doesn't work. are you sure no caching involved? (looks like varnish or maybe your browser cache?) the only way i could think of is that csmymodule frontName is used somewhere else within your magento installation (with the same action name who knows?). check Catalog >URL Rewrite management - could it be some redirect added there? – Konstantin Gerasimov Dec 13 '16 at 10:06
  • That is right @KonstantinGerasimov... May be it was just out of Magento or my browser cache, if i change frontname, old urls stop working! – Helly Feb 17 '17 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.