TransWikia.com

How to redirect a category to another link?

Magento Asked by Elham Gdz on December 19, 2021

I have an extension in my store that I can upload posts with this and it has a link in the top menu that’ name is blog.
In the menu, I have a category that’s name is News and I want to redirect it to blog. This means that when clicking on News on the menu it shows me blog.

How can I do this?

4 Answers

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>

Answered by Steven J on December 19, 2021

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.

Answered by Pon3 on December 19, 2021

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.

Answered by Magento Developer on December 19, 2021

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.

Answered by Adarsh Khatri on December 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP