I’ve noticed that I’m getting a lot of traffic recently for search queries regarding my previous post on some fairly unimportant details in the process of creating a 301 Permanent redirect using Magento’s URL Rewrite Management. I thought I would take a step back and post a quick how-to:
First: Is the redirect you want to implement at the page (“path”) or domain (“hostname”) level? If you need to redirect any part of the domain, you’ll have to do so somewhere else (like in the .htaccess file of your apache server)
Assuming then that this will be a redirect from one page to another, if I wanted to move and/or rename this page to a new URL, for example:
From: http://thewhatscool.com/seo/how-to-magento-301-redirect.html
To: http://thewhatscool.com/seo/magento-redirect-implementation.html
I would do the following in Magento to create the appropriate pemanent redirect:
- Navigate to Catalog > Url Rewrite Management
- Click the “Add Urlrewrite” button
- Select “Custom” from the “Create Urlrewrite” drop-down menu
- The “Urlrewrite Information” form would be completed thusly:
ID Path: seo/how-to-magento-301-redirect.html
Request Path: seo/how-to-magento-301-redirect.html
Target Path: http://thewhatscool.com/seo/magento-redirect-implementation.html
Redirect: Permanent(301)
So, to recap:
ID Path and Request path are the same: the path off the root of the url to redirect FROM – everything after (not including) the domain name and trailing slash.
Target path is the URL to redirect TO.
It looks like someone has plagiarized this post.
on this website
What if you had renamed the category, not the page?
i.e. if the category ‘seo’ was changed to ‘easyseo’, you now want to redirect
From: http://thewhatscool.com/seo/how-to-magento-301-redirect.html
To: http://thewhatscool.com/easyseo/how-to-magento-301-redirect.html
…but also the dozens of other pages in the category.
Is there an easy way to do this in Magento?
It’s just the category name itself that needs the rewrite, but if this requires a separate entry for each page it could result in thousands of entries
I think I am correct that you can do this kind of redirect in htaccess using appropriate expression syntax but cannot see a way of doing this from the rewrite manager in Magento admin.
Thanks for any suggestion you may have.
Thanks for this post very helpful for me and im sure others!