How to work with Magento Url Rewrite rules

Last modified by balexandre on Thu, June 24, 2010 16:25
Source|Old Revisions  

This is an old revision of the document!


Url rewrite is something that it is not easy to understand, it took me several attempts to get the job done, but at the end... looking at it, it does make sense :)

Let’s image, for our propose example, that we want to add links to the TOP MENU that will end up in a PAGE and not in the CATALOG (product view).

So we create our Press room sub category under Manage categories

Prees room sub category

Imagine that we what to have in the TOP MENU a link called PRESS ROOM and that should open the press room page that we already created in the CMS.

Prees room menu

as the default behavior Magento will create one Rewrite rule for every category, for every Store View, so we will end up with rewrites almost the same, only differentiating the Store View.

Default rules

Let’s get to work...

First thing to do is delete the System Rule, so we choose our Rule, press edit (right side) and it will show this:

Default rule

lets create a Custom Rule, conserve all values except the Target Path

Custom rule

lets save, and test it!

That’s it... simple right?

Now, don’t forget to do this for all Store Views if you have more than one.

For more information please read the Magento Documentation on URL Rewrites




 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs