Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does magento parse url?

Tags:

url

magento

We used django and in django there is one file urls.py which mention all possible url patterns. So we just want to know that when i open url http://localhost/magento/index.php/test123.html how this will map to product and which file i can check for this.

like image 946
Nilesh Avatar asked Jul 26 '26 00:07

Nilesh


1 Answers

Magento has more than one way of matching URLs. modules can register their own patterns, and these will generally be of the form /module/controller/action

In addition, CMS pages have URL identifiers and these can be anything you like - they can contain /s to give the illusion of hierarchy, but they're not significant.

Finally, Categories and Products have URL identifiers and there's a whole table of URL rewrites that map a path (/[category]/[subcategory]/[product] for example) to a product. In your example, I would guess that the product's URL identifier is 'test123' and that the store is setup to suffix URLs with '.html'

So, there's no file to look in (in this case), but rather the database/admin area.

like image 152
Greg Avatar answered Jul 28 '26 06:07

Greg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!