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. Web Design
    4. Redirection Problem

    Redirection Problem

    Web Design
    3 3 103
    • 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.
    • carl_daedricdigital
      carl_daedricdigital last edited by

      Wondering if anyone could offer some tips here please. I cannot share the site name so will try and be as detailed as possible.

      My client had their site on a .com domain and have decided to move to a co.uk domain. The new site has been put on the uk domain with more or less the same structure, save for pages which have been removed or merged.

      I am now setting up 301 redirects to tell the engines about the moved site, however this is giving me no end of grief. I can get domain.com to redirect to domain.co.uk no problems, however, if I try and redirect any of the inner pages to their new locations they all end up on the .co.uk home not where they should be. Given the homepage isn't designed to rank for all the terms.

      The htaccess I am using is below, I cannot see anything wrong with it, can anyone else?

      Redirect 301 / http://newdomain.co.uk/
      Redirect 301 /villa_rental.php http://newdomain.co.uk/villa_rental.html
      Redirect 301 /new_home.php http://newdomain.co.uk/new_home.html
      Redirect 301 /http://newdomain.com/villas.php http://newdomain.co.uk/villastyles.html
      Redirect 301 /developments.php http://newdomain.co.uk/developments.html
      Redirect 301 /solana_hills.php http://newdomain.co.uk/solana_hills.html
      Redirect 301 /middle_east.php http://newdomain.co.uk/middle_east.html
      Redirect 301 /denia.php http://newdomain.co.uk/denia.html
      Redirect 301 /faq.php http://newdomain.co.uk/faq.html

      I have tried both relative and full paths for the old site but doesn't make any difference. Does it matter the old site is php and the new html?

      many thanks

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

        May be totally wrong here, but it is a quick test...

        Switch the order of your redirects. First list all the old specific page to new specific page rules. Then last in the list put this rule - Redirect 301 / http://newdomain.co.uk/ (which you currently have first). That may let most of the specific pages do their thing before that general rule sends whatever is left to the homepage.

        The way you code your htaccess is a bit different from what I do. Mine has a lot more code for each rule, and some qualifiers like L and NE...

        Let us know if it works?

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

          Hi Carl,

          You should be able to do this with one rule:

          Options +FollowSymLinks 
          RewriteEngine on 
          RewriteRule (.*) [newdomain.co.uk] [R=301,L]

          Give this a shot and see if it works. It should direct http://www.olddomain.com/villa_rental.php to www.newdomain.com/villa_rental.php and so forth.

          Cheers,

          Jane

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Should I Redirect Pagination?
            Bigb06
            Bigb06
            0
            2
            521

          • 302 redirects, canonicalise or redirect (301)?
            eLab_London
            eLab_London
            0
            5
            754

          • 301 htaccess redirect or 301 HTTP DNS Redirect
            OlegKorneitchouk
            OlegKorneitchouk
            0
            2
            1.4k

          • Home page redirect - will this cause an SEO problem
            0
            1
            259

          • Redirection Of Mobile Traffic
            Mulith
            Mulith
            0
            6
            365

          • Page Redirection solution
            innofidelity
            innofidelity
            0
            11
            736

          • Type of redirect?
            RyanKent
            RyanKent
            0
            12
            1.2k

          • Redirecting 301 Redirects -- Will Search Engines Notice?
            bemcapaz
            bemcapaz
            0
            3
            870

          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