Special Router
markshust/magento2-module-specialrouter
This extension provides the ability to use special characters in controller or action names.
- Supported Magento versions
- 2.4.9
- License
- MIT
- Categories
- Miscellaneous
1,616 installsโ 14 stars67 downloads/monthLatest: v3.0.0Released 2026-04-27
composer require markshust/magento2-module-specialrouterREADME
Reproduced from the package’s own README, under its own license, as of 2026-10-31. Links and images point back at the source repository.
Magento does not provide the ability to set special characters on controller or action names. This module fixes that by providing the ability to use -, ., and ~ within a URL.
composer require markshust/magento2-module-specialrouter
bin/magento module:enable MarkShust_SpecialRouter
bin/magento setup:upgrade
This module is really simple to use. All you need to do is use the appropriate "name" that matches the symbol you'd like to use in the URL.
- Symbol:
-, Name:Dash - Symbol:
., Name:Period - Symbol:
~, Name:Tilda
For example, to respond to a request with a frontName of foo at the following location:
/foo/alpha-beta/charlie-delta
Use a PHP class named:
Controller/AlphaDashBeta/CharlieDashDelta.php
The - in the URL will be translated to dash in the actionPath and actionName, so if we create files using Dash in the controller and action name, they will respond to these requests.
This course is sponsored by M.academy, the simplest way to learn Magento.
My name is Mark Shust and I'm the creator of this repo. I'm a 6X Adobe Commerce Certified Developer and have been involved with Magento since the early days (v0.8!). I create technical education courses full-time for my company, M.academy.
Links
- Packagist
- PackageMaven (source of the quality data)
- Repository
- Issues
