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. Intermediate & Advanced SEO
    4. 301 redirect w/ dynamic pages to static

    301 redirect w/ dynamic pages to static

    Intermediate & Advanced SEO
    3 2 529
    • 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.
    • TheDude
      TheDude last edited by

      I am trying to redirect old dynamically created pages to a new static one (single page).  However, when I implement the redirects, it still uses part of the old dynamic url.  For instance...

      dynamic.php?var=example1

      dynamic.php?var=example2

      dynamic.php?var=example3

      should all redirect to: static.html.  However, they are redirecting to:

      static.html?var=example1

      static.html?var=example2

      static.html?var=example3

      The page is resolving fine, but I don't want google to misinterpret the new static page as numerous page with dup content.

      I tried this in PHP on the dynamic.php page as follows, but it the problem above persisted:

      header('HTTP/1.1 301 Moved Permanently');
      header('Location: http://www.mysite.com/static.html');

      I tried doing it in my .htaccess file as follows, but the problem persisted:

      redirect 301 /info/tool_stimulus.php?var=example1 http://www.mysite.com/static.html
      redirect 301 /dynamic.php?var=example2 http://www.mysite.com/static.html

      Can anyone solve this in PHP or w/ htaccess?

      Help!!! 🙂

      1 Reply Last reply Reply Quote 0
      • Devanur-Rafi
        Devanur-Rafi last edited by

        Hi there,

        If you are bothered about Google indexing multiple URLs that lead to the same page, you can try using the parameter handling tool in Google Webmaster Tools account. For more info:

        http://support.google.com/webmasters/bin/answer.py?hl=en&answer=1235687

        Hope this helps.

        Best regards,

        Devanur Rafi.

        TheDude 1 Reply Last reply Reply Quote 0
        • TheDude
          TheDude @Devanur-Rafi last edited by

          Thank you Devanur.  I will make use of this if a 301 redirect solution can not be found.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • 301 Redirect Only Home Page/Root Domain via Domain Registrar Only
            Roman-Delcarmen
            Roman-Delcarmen
            0
            4
            139

          • 301 Redirect from query string to new static page
            GastonRiera
            GastonRiera
            0
            4
            524

          • 301 Redirect to Home Page or Sub-Page?
            zeehj
            zeehj
            0
            2
            149

          • How to 301 Redirect /page.php to /page, after a RewriteRule has already made /page.php accessible by /page (Getting errors)
            DirkC
            DirkC
            0
            2
            435

          • I've got duplicate pages. For example, blog/page/2 is the same as author/admin/page/2\. Is this something I should just ignore, or should I create the author/admin/page2 and then 301 redirect?
            BeanstalkIM
            BeanstalkIM
            0
            5
            414

          • 301 Redirecting from Static to Dynamic URLs. I think we messed up
            FedeEinhorn
            FedeEinhorn
            1
            4
            164

          • Is 301 redirecting your index page to the root '/' safe to do or do you end up in an endless loop?
            MikeRoberts
            MikeRoberts
            0
            4
            136

          • Urgent Site Migration Help: 301 redirect from legacy to new if legacy pages are NOT indexed but have links and domain/page authority of 50+?
            JDMcNamara
            JDMcNamara
            0
            7
            450

          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