The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. 301 on certain url string

    301 on certain url string

    Technical SEO Issues
    3 2 289
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • omega
      omega last edited by

      I have a few thousand old urls with the string /content/ in them and are looking for a way to 301 batch redirect them. So for all the urls that contain the word 'content' I would like to redirect to 1 specific page. I have tried the methods below without success. Regular 301's are working fine but this particular method is not working for me. I am running a Joomla site but I don't imagine that would have any impact. Any suggestions would be greatly appreciated.

      Redirect 301 ^content/.*$ http://www.mysite.com

      Redirect 301 ^content/ http://www.mysite.com

      1 Reply Last reply Reply Quote 0
      • Adam.Whittles
        Adam.Whittles last edited by

        Try this:

        RedirectMatch 301 ^/content/.*$ http://www.mysite.com

        I think that should work. Let me know if you have any problems.

        Adam.

        1 Reply Last reply Reply Quote 1
        • omega
          omega last edited by

          fantastic! worked a treat, thankyou

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • URL 301 Re-direct
            Trymybest
            Trymybest
            1
            4
            65

          • To 301 or not to 301?
            iHasco
            iHasco
            1
            4
            70

          • To 301 or not to 301?
            seorocket
            seorocket
            0
            3
            91

          • I have altered a url as it was too long. Do I need to do a 301 redirect for the old url?
            TomRayner
            TomRayner
            0
            4
            181

          • Crawl reveals hundreds of urls with multiple urls in the url string
            irvingw
            irvingw
            0
            5
            455

          • Drupal URL Aliases vs 301 Redirects + Do URL Aliases create duplicates?
            YannickVeys
            YannickVeys
            0
            4
            2.5k

          • Trailing Slashes In Url use Canonical Url or 301 Redirect?
            RyanKent
            RyanKent
            0
            7
            2.7k

          • How do I 301 url's with numbers in them?
            BradBorst
            BradBorst
            0
            7
            719

          Get started with Moz Pro!

          Unlock the power of advanced SEO tools and data-driven insights.

          Start my free trial
          Products
          • Moz Pro
          • Moz Local
          • Moz API
          • Moz Data
          • STAT
          • Product Updates
          Moz Solutions
          • SMB Solutions
          • Agency Solutions
          • Enterprise Solutions
          • Digital Marketers
          Free SEO Tools
          • Domain Authority Checker
          • Link Explorer
          • Keyword Explorer
          • Competitive Research
          • Brand Authority Checker
          • Local Citation Checker
          • MozBar Extension
          • MozCast
          Resources
          • Blog
          • SEO Learning Center
          • Help Hub
          • Beginner's Guide to SEO
          • How-to Guides
          • Moz Academy
          • API Docs
          About Moz
          • About
          • Team
          • Careers
          • Contact
          Why Moz
          • Case Studies
          • Testimonials
          Get Involved
          • Become an Affiliate
          • MozCon
          • Webinars
          • Practical Marketer Series
          • MozPod
          Connect with us

          Contact the Help team

          Join our newsletter
          Moz logo
          © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
          • Accessibility
          • Terms of Use
          • Privacy