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. Simple 301 redirect a subfolder to another subfolder

    Simple 301 redirect a subfolder to another subfolder

    Technical SEO Issues
    3 3 7.6k
    • 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.
    • aactive
      aactive last edited by

      Hi,

      I have a number of sub-folders that I have to move, each of which contains a number of files.

      subfolder A has files a, b & c

      subfolder B has files d, e & f
      subfolder C has files g, h & i

      A, B & C folders need to be X, Y & Z

      Will the following work?

      RewriteRule ^subfolder-A/* http://www.domain.com/subfolder-X/ [R=301,L]
      RewriteRule ^subfolder-B/* http://www.domain.com/subfolder-Y/ [R=301,L]
      RewriteRule ^subfolder-C/* http://www.domain.com/subfolder-Z/ [R=301,L]

      will this result in visitors to http://www.domain.com/subfolder-B/f.html being redirected to http://www.domain.com/subfolder-Y/f.html?

      All on the same domain.

      in reality we are talking hundreds of sub folders and thousands of files so we don't want to have to reference every file individually in the htaccess.

      Thanks

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

        this should tell you

        http://www.htaccessredirect.co.uk/

        http://yoast.com/change-wordpress-permalink-structure/

        http://www.webconfs.com/htaccess-redirect-generator.php

        http://www.internetofficer.com/seo-tool/redirect-check/

        http://www.webconfs.com/how-to-redirect-a-webpage.php

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

          Try this:

          Redirect 301 /a http://www.domain.com/x

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Will doing a 301 redirect for one domain to another give the latter domain the formers links?
            mickburkesnr
            mickburkesnr
            0
            5
            128

          • Problem with 301 redirects from one website to another (web migration project)
            _nitman
            _nitman
            0
            3
            140

          • How to redirect subfolder on different domain to another but same ftp
            Stramark
            Stramark
            0
            2
            237

          • 301 Redirect
            WyzeOwl
            WyzeOwl
            0
            5
            89

          • Redirect a 301 Redirect
            RedCaffeine
            RedCaffeine
            0
            5
            98

          • 301 redirect
            Mark.RedGiant
            Mark.RedGiant
            0
            3
            322

          • 301 redirects
            vibelingo
            vibelingo
            0
            5
            255

          • Delete 301 redirected pages from server after redirect is in place?
            RuthBurrReedy
            RuthBurrReedy
            0
            5
            4.0k

          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