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 Redirect NOT Working as Expected - HELP!

    301 Redirect NOT Working as Expected - HELP!

    Technical SEO Issues
    5 2 1.1k
    • 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.
    • hiphound
      hiphound last edited by

      Hi!

      I just launched our newly coded site and just realized the installed 301 is NOT working. The URL string is the same EXCEPT for the removal of /shop/. Here is the code in .htaccess:

      ############################################

      enable rewrites

      Options +FollowSymLinks

      RewriteEngine on

      #RedirectMatch 301 ^/shop?/$ http://hiphound.com/

      RedirectMatch 301 ^/shop?/$ http://hiphound.com

      ###########################################

      When I go to Google and click on an old link I get a 404. No bueno!! Here is an example:

      http://hiphound.com/shop/rubit-dog-tag-clip

      I thought (and was told) that the installed 301 would send this page to:

      http://hiphound.com/rubit-dog-tag-clip

      It's not. Please HELP!! 🙂 What am I doing wrong???

      Lynn

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

        Try this, I think this it what you are trying to do.

        Redirect 301 /shop/ http://www.hiphound.com/

        However, if you want to change where it goes, and add an extension, like the # you would do this

        Redirect 301 /shop/ http://www.hiphound.com/#

        hiphound 1 Reply Last reply Reply Quote 0
        • hiphound
          hiphound @JordanJudson last edited by

          Hi!

          Tried that and same issue. 404. Ugh!!!

          What the heck am I doing wrong? Thanks for the feedback. It is appreciated.

          Lynn

          JordanJudson hiphound 2 Replies Last reply Reply Quote 0
          • JordanJudson
            JordanJudson @hiphound last edited by

            Hmmm thats weird, it worked on my site. Anyways I just checked out your site and it looks like you figured it out, what ended up working for you?

            1 Reply Last reply Reply Quote 0
            • hiphound
              hiphound @hiphound last edited by

              Hi!!

              Yeah strange. Here is the code the hosting guys came up with:

              ############################################

              enable rewrites

              Options +FollowSymLinks
                  RewriteEngine ON

              RewriteCond %{HTTP_HOST} ^www.(.)$ [NC]
                  RewriteRule ^(.
              )$ http://%1/$1 [L,R=301]

              RedirectMatch 301 ^/shop/(.*)$ http://hiphound.com/$1

              ############################################

              The first rule is for www to non-www redirection and the second rule is for my URL structure change.

              Thanks so much for your help! 🙂

              Lynn

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • Help Setting Up 301 Redirects from Coldfusion Site to Wordpress Site.
                MarketHubb
                MarketHubb
                1
                3
                143

              • 301 Redirect Help
                dhidalgo1
                dhidalgo1
                1
                3
                115

              • 301 redirect not working
                BlueprintMarketing
                BlueprintMarketing
                0
                12
                4.5k

              • Will a timed 301 redirect work for Googlebot?
                GOODSIR
                GOODSIR
                0
                3
                366

              • Need Help writing 301 redirects in .htaccess file
                Dr-Pete
                Dr-Pete
                0
                5
                1.3k

              • Is my 301 redirect working?
                johnshearer
                johnshearer
                0
                15
                3.1k

              • Looking for some help adding a 301 redirect for my Site
                Highland
                Highland
                0
                5
                633

              • 301 Redirect Help
                hiphound
                hiphound
                0
                3
                891

              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