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. How can i redirect a url that has % in it?

    How can i redirect a url that has % in it?

    Technical SEO Issues
    2 2 605
    • 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.
    • Madlena
      Madlena last edited by

      Google webmaster tools shows a 400 eroor for an old  link that contains a 30% off in it. The problem is the %

      I would like to 301 redirect this link :

      http://www.geographics.com/Graduation-Stationery,-35%-OFF-Printable-Certificates-Blank-Gift-Certificates/c1353_1354_1359/index.html

      to

      http://www.geographics.com/Graduation-Stationery-Printable-Certificates-Blank-Gift-Certificates/c1353_1354_1359/index.html

      We do not know how to do this in httaccess. Can you please advise?

      Thanks a lot!

      Madlena

      1 Reply Last reply Reply Quote 0
      • joseph.chambers
        joseph.chambers last edited by

        You need to encode it.

        [komimoda@home ~]$ php echo urlencode('http://www.geographics.com/Graduation-Stationery,-35%-OFF-Printable-Certificates-Blank-Gift-Certificates/c1353_1354_1359/index.html'); ?> http%3A%2F%2Fwww.geographics.com%2FGraduation-Stationery%2C-35%25-OFF-Printable-Certificates-Blank-Gift-Certificates%2Fc1353_1354_1359%2Findex.html[komimoda@home ~]$

        It's bombing on the %-  that isn't a number after it. If you want to shoot me a email I can get it done for you for free? joseph@michael-chambers.com

        Without db hashing, it's nearly impossible to get those from htaccess into a rewrite table lookup. %20 for sure. apache turns the char back to a space before passing it on for comparison. and text based of course, uses the space as a separater between match, and replacement. It probably also turns %25 back into a % before hash tables too. sorry tmi.

        Oh look at this:

        http://www.geographics.com/Graduation-Stationery%2C-35%25-OFF-Printable-Certificates-Blank-Gift-Certificates/c1353_1354_1359/index.html

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        • Can you help by advising how to stop a URL from referring to another URL on my website please?
          Levanniko253
          Levanniko253
          0
          2
          31

        • Can redirect URL website also shown on the google ranking? and higher than the original website?
          Nigel_Carr
          Nigel_Carr
          0
          4
          57

        • 301 redirects - one overall redirect or an individual one for each page url
          Kurt_Steinbrueck
          Kurt_Steinbrueck
          1
          4
          160

        • 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

        • How can I redirect old URLs to new ones?
          blu42media
          blu42media
          0
          12
          7.2k

        • I can see one url and get one url ( after copying) urgent pls!
          KeriMorgret
          KeriMorgret
          0
          2
          634

        • Is a 302 redirect the correct redirect from a root URL to a detail page?
          KeriMorgret
          KeriMorgret
          0
          7
          1.8k

        • When URL rewrite can lead to un pretty URLs
          RyanOD
          RyanOD
          1
          8
          1.4k

        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