add-custom-url1

Custom Rewrite

You can use a custom rewrite to redirect CMS pages, or any other type of page. For example, if
you change the URL key of the privacy policy from privacy-policy-cookierestriction-mode
to privacy-policy, the link in the cookie restriction mode will return
“404 – Page Not Found.” To redirect traffic to the new URL key, create a custom rewrite with
the following settings:
ID Path: privacy-policy
Request Path: privacy-policy-cookie-restriction-mode
Target Path: privacy-policy
Redirect: Permanent (301)
Before you begin, figure out the URL keys that you need for the ID Path, Request Path, and
Target Path. Just remember— the “Request Path” is the old URL, and the “ID Path” and “Target
Path” are the new URL.

Process Overview:
Step 1: Establish the Request and Target Paths
Step 2: Create the Custom Rewrite
Step 3: Refresh the Index
Step 4: Test the Rewrite

Step 1: Establish the Request and Target Paths

Before you begin, write down the URL key of the page to be redirected (Request Path), and the
target page where it will be redirected (Target Path).

Step 2: Create the Custom Rewrite

1. On the Admin menu, select Catalog > URL Rewrite Management.
2. In the upper-right corner, click the Add URL Rewrite button.
3. Set Create URL Rewrite to “Custom.”

4. In the URL Rewrite Information section, do the following:
a. If you have multiple stores, select the Store where the rewrite applies.
b. In the ID Path field, enter the relative path of the destination page.

  • To redirect to another CMS page in your store, enter the relative path to the page,
    without a leading forward slash.
  • To redirect to a page on a different site, enter the fully qualified URL of the new
    destination.

new-page URL key of target page.
somewhere/new-page Relative path to target page, without leading forward
slash.
http://magento.com Fully qualified URL of target page on external website.
c. In the Request Path field, enter the relative path of the page to be redirected.
d. In the Target Path field, enter the valid URL of an existing page that will be the new
destination. This refers to the same page as the ID Path.
e. Set Redirect to one of the following:

  • Temporary (302)
  • Permanent (301)

f. For your own reference, enter a brief Description of the rewrite.
In the following illustration, the CMS page “about-magento-demo-store” is temporarily
redirected to the target, “my-page.”

5. When complete, click the Save button.
Your new rewrite now appears at the top of the list.

Step 3: Refresh the Index

1. On the Admin menu, select System > Index Management.
2. Select the Catalog URL Rewrites checkbox.
3. Set the Actions control to “Reindex Data,” and click the Submit button.

Step 4: Test the Rewrite

Test the rewrite from your store, to make sure that it works correctly.

Leave a Comment

Your email address will not be published. Required fields are marked *