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. .htaccess 301 Redirect Help! Specific Redirects and Blanket Rule

    .htaccess 301 Redirect Help! Specific Redirects and Blanket Rule

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

      Hi there,

      I have the following domains:

      OLD DOMAIN: domain1.co.uk

      NEW DOMAIN: domain2.co.uk

      I need to create a .htaccess file that 301 redirects specific, individual pages on domain1.co.uk to domain2.co.uk

      I've searched for hours to try and find a solution, but I can't find anything that will do what I need.

      The pages on domain1.co.uk are all kinds of filenames and extensions, but they will be redirected to a Wordpress website that has a clean folder structure.

      Some example URL's to be redirected from the old website:

      http://www.domain1.co.uk/charitypage.php?charity=357

      http://www.domain1.co.uk/adopt.php

      http://www.domain1.co.uk/register/?type=2

      These will need to be redirected to the following URL types on the new domain:

      http://www.domain2.co.uk/charities/

      http://www.domain2.co.uk/adopt/

      http://www.domain2.co.uk/register/

      I would also like a blanket/catch-all redirect from anything else on www.domain1.co.uk to the homepage of www.domain2.co.uk if there isn't a specific individual redirect in place.

      I'm literally tearing my hair out with this, so any help would be greatly appreciated!

      Thanks

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

        I've found this as a good source in the past, not sure if you have already checked it out:

        http://www.internetmarketingninjas.com/blog/search-engine-optimization/301-redirects/

        1 Reply Last reply Reply Quote 1
        • LynnPatchett
          LynnPatchett last edited by

          Hi Steve,

          htaccess can be tricky! That link above is a good overview of the options. What you want in your case I think is to make sure that the specific individual page url rewrites are before the generic domain rewrite so they are triggered first and the generic redirect is only triggered if none of the individual page urls above it are hit.

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post
          • Will this 301 redirects help me?
            Staunton_Rook
            Staunton_Rook
            0
            3
            35

          • Htaccess rewrite rule (very specific)
            irvingw
            irvingw
            0
            4
            118

          • How to redirect an url in .htaccess when "redirect 301" doesnt work
            WilliamKammer
            WilliamKammer
            0
            5
            173

          • 301 redirect rule
            MichaelC-15022
            MichaelC-15022
            0
            8
            343

          • 301 redirect on Windows IIS. HELP!
            TakeshiYoung
            TakeshiYoung
            0
            2
            222

          • Why isnt my crawl results showing a 301 redirect even though I have a 301 rewrite in my .htaccess file?
            PCTechGuy2012
            PCTechGuy2012
            0
            8
            462

          • 301 redirect help
            Jinx14678
            Jinx14678
            0
            6
            609

          • I need help with htaccess redirect
            RyanKent
            RyanKent
            0
            4
            1.1k

          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