Skip to main content
added 403 characters in body
Source Link
Ekk4rd
  • 525
  • 2
  • 12

The UrlRewrite Module. And so the urlrewrite rules use an additinoal entry inside the routerList. This entry has the sort order of 20.

    <type name="Magento\Framework\App\RouterList">
        <arguments>
            <argument name="routerList" xsi:type="array">
                <item name="urlrewrite" xsi:type="array">
                    <item name="class" xsi:type="string">Magento\UrlRewrite\Controller\Router</item>
                    <item name="disable" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="string">20</item>
                </item>
            </argument>
        </arguments>
    </type>

This routerlist is traversed inside the Magento\Framework\App\FrontController. The first one which matched your route is used.

Before the urlRewrite only the RouterList of the module-robots is used.

If i think about which RouterList maybe processes the routes.xml iSo I would guess that url-rewrite takes precendence before routes.xml, but i didn't dig further into it yet.

*edit:
What checks for the routes.xml inside the frontend is not the default router out of. But the standard router, which is also defined in the module-storesstore di.xml and is located in. Magento\Framework\App\Router\Base. This one actually has a sort order of 100. This would mean that the routes.xml30 and is checked as very last, if it matched your routeprocessed directly after the url-rewrites.

So I would guess that urlThe default router which is also defined in module-rewrite takes precendence before routes.xmlstore, but i didn't dig further into it yetis only for processing the no-route pages.

The UrlRewrite Module. And so the urlrewrite rules use an additinoal entry inside the routerList. This entry has the sort order of 20.

    <type name="Magento\Framework\App\RouterList">
        <arguments>
            <argument name="routerList" xsi:type="array">
                <item name="urlrewrite" xsi:type="array">
                    <item name="class" xsi:type="string">Magento\UrlRewrite\Controller\Router</item>
                    <item name="disable" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="string">20</item>
                </item>
            </argument>
        </arguments>
    </type>

This routerlist is traversed inside the Magento\Framework\App\FrontController. The first one which matched your route is used.

Before the urlRewrite only the RouterList of the module-robots is used.

If i think about which RouterList maybe processes the routes.xml i would guess it is the default router out of module-stores... This one actually has a sort order of 100. This would mean that the routes.xml is checked as very last, if it matched your route.

So I would guess that url-rewrite takes precendence before routes.xml, but i didn't dig further into it yet.

The UrlRewrite Module. And so the urlrewrite rules use an additinoal entry inside the routerList. This entry has the sort order of 20.

    <type name="Magento\Framework\App\RouterList">
        <arguments>
            <argument name="routerList" xsi:type="array">
                <item name="urlrewrite" xsi:type="array">
                    <item name="class" xsi:type="string">Magento\UrlRewrite\Controller\Router</item>
                    <item name="disable" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="string">20</item>
                </item>
            </argument>
        </arguments>
    </type>

This routerlist is traversed inside the Magento\Framework\App\FrontController. The first one which matched your route is used.

Before the urlRewrite only the RouterList of the module-robots is used.

So I would guess that url-rewrite takes precendence before routes.xml, but i didn't dig further into it yet.

*edit:
What checks for the routes.xml inside the frontend is not the default router. But the standard router, which is also defined in the module-store di.xml and is located in. Magento\Framework\App\Router\Base. This one has a sort order of 30 and is processed directly after the url-rewrites.

The default router which is also defined in module-store, is only for processing the no-route pages.

Source Link
Ekk4rd
  • 525
  • 2
  • 12

The UrlRewrite Module. And so the urlrewrite rules use an additinoal entry inside the routerList. This entry has the sort order of 20.

    <type name="Magento\Framework\App\RouterList">
        <arguments>
            <argument name="routerList" xsi:type="array">
                <item name="urlrewrite" xsi:type="array">
                    <item name="class" xsi:type="string">Magento\UrlRewrite\Controller\Router</item>
                    <item name="disable" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="string">20</item>
                </item>
            </argument>
        </arguments>
    </type>

This routerlist is traversed inside the Magento\Framework\App\FrontController. The first one which matched your route is used.

Before the urlRewrite only the RouterList of the module-robots is used.

If i think about which RouterList maybe processes the routes.xml i would guess it is the default router out of module-stores... This one actually has a sort order of 100. This would mean that the routes.xml is checked as very last, if it matched your route.

So I would guess that url-rewrite takes precendence before routes.xml, but i didn't dig further into it yet.