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. White Hat / Black Hat SEO
    4. Suggestions in redirecting an old URL to new URL with parenthesis () ?

    Suggestions in redirecting an old URL to new URL with parenthesis () ?

    White Hat / Black Hat SEO
    4 2 306
    • 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.
    • esiow2013
      esiow2013 last edited by

      What should I use in .htaccess if I will redirect an old URL with parentheses to a new URL like below?

      RedirectMatch 301 http://www.olddomain.com/buy/nike-shoes/kobe(7)/red http://www.newdomain.com/buy/nike-shoes/kobe(7)/red

      Or

      RedirectMatch 301 http://www.olddomain.com/buy/nike-shoes/kobe(7)/red http://www.newdomain.com/buy/nike-shoes/kobe(7)/red

      1 Reply Last reply Reply Quote 0
      • ThompsonPaul
        ThompsonPaul last edited by

        The successful way to accomplish this can depend a bit on your server configuration, esiow, but the most likely workable and reliable solution is to "escape" the non-standard URL characters. (Actually, the best solution would be to get rid of the unsafe URL characters altogether, but that's not what you asked 🙂 )

        .htaccess rewritedirect rules are essentially regular expressions or regexp. In regexp, many non-URL characters are used to format different commands. So having them as an actual URL character causes the redirect rule to try to process them as regexp instead of as just a URL character. Whew - hope that makes sense.

        To tell the redirect rule to treat the non-standard character as an actual character instead of a command - you "escape" it by adding a "****" (without the quotes) in front of each character that could be a problem.

        So:

        RedirectMatch 301 http://www.olddomain.com/buy/nike-shoes/kobe(7)/red http://www.newdomain.com/buy/nike-shoes/kobe(7)/red

        becomes:

        RedirectMatch 301 http://www.olddomain.com/buy/nike-shoes/kobe**\**(7**\**)/red http://www.newdomain.com/buy/nike-shoes/kobe**\**(7**\**)/red

        Give that a try in your .htaccess file and let us know if it works. if not, there may be a couple other options to try.

        Hope that helps?

        Paul

        esiow2013 1 Reply Last reply Reply Quote 2
        • esiow2013
          esiow2013 @ThompsonPaul last edited by

          I'll try this one. Big help ThompsonPaul! I'll let you know if this works. Thanks a lot!

          ThompsonPaul 1 Reply Last reply Reply Quote 0
          • ThompsonPaul
            ThompsonPaul @esiow2013 last edited by

            So did that process of escaping the special characters solve your issue, esiow?

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • How to do 301 from an old/closed site to a new site?
              seoelevated
              seoelevated
              0
              4
              94

            • Spam signals from old company site are hurting new company site, but we can't undo the redirect.
              VeroBrain
              VeroBrain
              1
              2
              58

            • How to 301 redirect from old domain and their pages to new domain and pages?
              andzon
              andzon
              0
              9
              5.5k

            • How to redirect a URL with "ñ" like domain.com/folder-name/name-ñ/ to another URL with ñ?
              redfishking
              redfishking
              0
              2
              397

            • Can I 301 redirect old URLs to staging URLs (ex. staging.newdomain.com) for testing?
              esiow2013
              esiow2013
              0
              3
              260

            • URL structure: 301 redirect or leave as is?
              stever999
              stever999
              0
              3
              102

            • How long we can keep 302 redirection for a webpage url?
              MickEdwards
              MickEdwards
              0
              2
              418

            • Redirecting old domains for SEO ranking?
              Dr-Pete
              Dr-Pete
              0
              4
              378

            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