Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3960388
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:50:53+00:00 2026-05-20T02:50:53+00:00

We are doing some SEO optimizations on our Magento store front and I need

  • 0

We are doing some SEO optimizations on our Magento store front and I need some advice on the best way to change category urls. Our SEO contractors want to change a bunch of urls from:

/base-cat/sub-cat1/sub-cat2.html 

to

/seo-friendly-cat2.html.

We have a bunch of nested categories (5 top-level and a bunch of sub categories up to 4 levels deep). Since this helps our customers drill down through the main navigation, we aren’t sure if we want to change the category hierarchy. But we might be doing these url changes on 100 categories or so.

I know we can do part of this with using 301 rewrites (using .htaccess or Magento’s built-in rewrite module), but what is the best way to approach this? One of the drawbacks I see to using 301s is that the main navigation will continue to have the long, sub category url in it’s link. Should I look at doing a custom module that allows us to specify an exact url for categories (rather than a url token specific to the hierarchy)? What is your advice?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:50:53+00:00Added an answer on May 20, 2026 at 2:50 am

    More than likely you’re going to want to write a script to do this for you and keep it within Magento’s URL Management instead of some long un-manageable list of rewrites/redirects in .htaccess or such.

    Your biggest issue I would think would be any collisions where the same filename exists and how you would want to handle such.

    Mage::getModel('core/url_rewrite')
    ->setIsSystem(0)
    ->setStoreId($storeId)   
    ->setOptions('RP')  
    ->setIdPath('index.php?cat=c' . $categoryId . '_' . $this->strip($data['name']) . '.html')
    ->setTargetPath($categoryModel->getUrlPath() . '.html')
    ->setRequestPath('index.php?cat=c' . $categoryId . '_' . $this->strip($data['name']) . '.html')
    ->save();
    

    This is just an example of how to add rewrite’s into Magento’s URL Rewrite Manager.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently put up a site and I have been doing some SEO. However
I'm doing some SEO for a website I haven't built and it has this
Hi what does this code do, I have a seo company doing some work
While doing some refactoring of our projects and solution files, i have separated some
Recently I've been doing some research into SEO and how URIs that use hyphens
I doing some forms, and tried to made a nested form that way: <%=
Doing some jquery animation. I have certain divs set up with an attribute of
Doing some homework here (second assignment, still extremely green...). The object is to read
In doing some bioinformatics work, I've been pondering the ramifications of storing object instances
After doing some Core animations using: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.5]; [self setAffineTransform:CGAffineTransformIdentity]; [UIView

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.