Skip to content

Magento2: How to get controller URL with index/index and parameter?

I am using magento2.4.3-p2 and I want to access the controller URL without index/index AND parameter.

for example https://example.com/product-info/A123456

I want to access A123456 code from the URL and check the mapping with the product SKU and show the product information on this page

Please help with how to access the code from the URL and use it in the controller and show the product info.

Thanks