7

I have an extension in my store that i can upload posts with this and it has a link in top menu that' name is blog. In menu I have a category that's name is News and I want to redirect it to blog. Means that when click on News in menu it shows me blog.

How can I do this?

14

Simply go to catalog > URL rewrite management and choose "add rewrite" then choose your "custom" from dropdown.

In Request path section enter your category link (ex. if url is www.example.com/category then enter category only) and in Target path enter your target url (ex. if blog url is "www.example.com/blog" then just "blog")

Hope this helps.

Update 1

If you receive Request Path for Specified Store already exists. then you need to go to catalog > Url rewrite management and then edit that category by finding it in that grid page.

Update 2

If none of above work for your try to add redirect in your .htaccess file

Redirect 301 /category.html http://www.example.com/blog.html

Explanation

For each store magento needs unique identity for request path, so you cannot add another and by default magento disables category rewrites request path field. So .htaccess is the best option here unless you update it from database directly. And good thing with the .htaccess is you can simply remove it when you need it but if you directly edited your database then will need to edit it again when removing.

  • I can't found target section? which field do you mean? – Elham Gdz Jun 24 '15 at 10:24
  • Plez check my updated answer. – Adarsh Khatri Jun 24 '15 at 10:31
  • I get this error: Request Path for Specified Store already exists. – Elham Gdz Jun 24 '15 at 10:36
  • I see, that means you already have rewrite for this category, which you will need to edit instead of adding new. See my updated answer then. – Adarsh Khatri Jun 24 '15 at 10:43
  • So I can't edit target path in it, I just can edit request path.what can I do? – Elham Gdz Jun 24 '15 at 10:44
2

Go to catalog -> URL rewrite management, create "add url rewrite".

choose "custom" in "Create URL Rewrite:" field.

In Request path give your "News menu url".

In target path give your "blog url".

save changes.

If you get any error, find your request path in the grid.If it already exists try edit that one or delete that one.

1

This is the only thing I've found that works - but it's not the cleanest method. It goes in your Custom Design > Custom Layout Update area in the category you want to redirect FROM.

<reference name="head">
    <block type="core/text" name="SOME.BLOCK.NAME.HERE">
        <action method="setText">
            <text><![CDATA[<script type="text/javascript">location.replace("https://www.WEBSITE.com/CUSTOM-REDIRECT");</script>]]></text>
        </action>
    </block>
</reference>
0

I got it to work by simply deleting the existing rewrite rule in catalog -> URL rewrite management.

Click on my category menu in the frontend you will see that the url is not rewritten anymore, you should see something like catalog/category/view/s/xxx/id/xx/ when you access the category page.

Add a new rule (type 301), with the request path catalog/category/view/s/xxx/id/xx/, and target path being your CMS page.

protected by Community Oct 20 '18 at 17:11

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.