ADMIN: Catalog → URL Rewrite Management

Last modified by chiefair on Tue, November 2, 2010 11:11
Source|Old Revisions  

This is an old revision of the document!


Description

The URL Rewrite Management page is an SEF tool that you can apply to the URLs of your category, product pages and CMS pages. Rather than having all your URLs in the default format, which uses category and product IDs, you can use this feature to create a more descriptive URL, making it easier for search engines to find your pages. Whenever a new category or product is created, a new entry will be added to this list, one for each existing store view. Using Catalog → URL Rewrite Management allows you to avoid editing your .htaccess file directly as well by managing the application redirects from inside of the application.

Preconditions

Before using this feature, there are two important settings that you must configure in System → Configuration → Web.

  • Use Web Server Rewrites - This controls whether Magento will automatically generate SEF URL rewrites for products and categories when they are created. If this is set to “No”, no system URL rewrites will be generated but you can still manually create custom URL rewrites using the Catalog > URL Rewrite Management option.
  • Add Store Code to URLs - This determines whether the store ID (in addition to the category ID or product ID) will be used in the URLs for your site. If you are managing multiple stores, this will create a separate URL rewrite for each product and category for each store. Set this before you manually create custom URL rewrites because the target paths will all be invalidated if you change it afterward.

Admin Panel Fields Reference

Add New URL Rewrite

Allows you to manually create new URL rewrites. Because Category and Product pages automatically generate a rewrite when they are created, this is most useful for adding multiple Request Paths that point to the same Target Path. Additionally, you can create rewrites that point to CMS landing pages, such as a FAQ page.

Field Descriptions

  • For -
    • For category - Select this if you’re setting up a URL rewrite to an existing category page
    • For product - Select this if you’re setting up a URL rewrite to an existing product page
    • Custom - Select this if you’re setting up a URL rewrite to an existing CMS page or to a location on another domain
    • System - Is not an option that’s selectable by the user, but is used by Magento to auto-generate the SEF URLs for products and categories when they are created

Edit URL Rewrite

Field Descriptions

  • Type - For automatically created rewrites, this value will be System. For manually created rewrites, this value will be Custom (”for category” and “for product” are just special “custom” types). Type cannot be changed after a URL rewrite is created.
  • Store - The name of the store view to which the rewrite directs. Because a separate rewrite is created for each existing store view, this too can not be changed.
  • ID Path - Will display in the format of {Type}/{ID#}. If the Type is System, it will further be specified as either category or product. For products, there may also be an additional /{associated category ID#} following the standard format. This can not be changed.
  • Request Path - This is the SEF URL that you can edit. It will be automatically generated with the name that you specified for the category or product when it was created. If it is a product, it may also include the associated category, or a suffix (such as .html), if you have enabled those features in the Catalog Configuration (refer back to the beginning of this chapter for more information about this). However, you can edit this to whatever format you desire. This is the same field that you see in an individual product or category page called URL key. To find this field, navigate to Catalog > Manage Products/Categories and edit the desired product/category. Whether you choose to edit the value in the URL Rewrite Management page, or the individual product/category page, it makes no difference. Note: The Request Path must be unique for each rewrite.
  • Target Path - This is the actual URL that points to the page. It is a relative path, automatically generated in a certain format, and can not be changed.
  • Redirect - Yes | No. If you select Yes, the URL will switch to the Target Path when the Request Path is entered in the address bar. If you select No, the URL will remain in the format of the Request Path. (And depending on your version may offer you a 301 permanent or 302 temporary redirect)
  • Description - This is for internal purposes to help you identify the purpose of the rewrite in lists.

Edit URL Rewrite - Custom - Not Category or Product

Field Descriptions

  • Type - For manually created Custom rewrites, this value will be Custom. Type cannot be changed after a URL rewrite is created.
  • Store - The name of the store view to which the rewrite directs. Because a separate rewrite is created for each existing store view, this too can not be changed.
  • ID Path - Unique Identifier for this URL Rewrite Rule. Manually assigned and editable. (Example: brand/search/result/brandname )
  • Request Path - This is the SEF URL that you can edit. Manually assigned, it is the relative url you would like the user to see and use. (Example: brand/brandname.html ) Note: The Request Path must be unique for each rewrite.
  • Target Path - This is the actual URL that points to the page that you can edit. It is a relative path, used by the system to access the particular page you want to display and is set up through CMS or system functions, and must exactly match what is expected or 404 is in your future. (Example: catalogsearch/advanced/result/?brand=brandname )
  • Redirect - Yes | No. If you select Yes, the URL will switch to the Target Path when the Request Path is entered in the address bar. If you select No, the URL will remain in the format of the Request Path. (And depending on your version may offer you a 301 permanent or 302 temporary redirect)
  • Description - This is for internal purposes to help you identify the purpose of the rewrite in lists.

Further Reading




 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs