Finding Product URL Rewrites with SQL (Magento 2)

When product URLs behave unexpectedly, a direct look at Magento’s url_rewritetable can be useful. It stores public-facing paths, internal targets and redirects for product URLs. Use the following query to display URL rewrites for a specific SKU:

request_path contains…

Reading request parameters (Magento 1)

The following short snippet is sufficient to read a Magento request parameter: