I have created a new module with my custom route. The frontname for my module is vendor and the id is vendor

I have created a page with route vendor/index/index, created a controller and block for my page. I have also created a layout file with name frontend/layout/vendor_index_index.xml

But when I try to access my page on frontend with url vendor or vendor/index/index it shows me 404 page. The page works if I use index.php/vendor or index.php/vendor/index/index

I am not sure about the issue as I have other modules with custom routes and they work perfectly fine without index.php.

I have checked and made sure that I have URL rewrite enabled in my configuration. Did anyone face any issue like this? What could be the reason and the solution for the issue?

  • Can you please share code, etc/module.xml, etc/frontend/routes.xml & controller code.
    – Ravi Soni
    Commented Nov 18, 2019 at 9:34
  • it's shows magento's 404 or apache/nginx 404 ? Commented Nov 18, 2019 at 9:45
  • @RakeshVarma It is showing apache/nginx 404 Commented Nov 18, 2019 at 9:48
  • check my answer Commented Nov 18, 2019 at 9:50

1 Answer 1


You have to Rename your frontname because when you access vendor/index/index first it will goto the vendor folder not in your controller so in Vendor there is no any file for index that's why you are facing such issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.