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. How to redirect my .com/blog to my server folder /blog ?

    How to redirect my .com/blog to my server folder /blog ?

    Technical SEO Issues
    5 3 149
    • 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.
    • AymanH
      AymanH last edited by

      Hello SEO Moz !

      Always hard to post something serious for the 04.01 but anyway let's try !

      I'm releasing Joomla websites website.com, website.com/fr, website.com/es and so on.

      Usually i have the following folders on my server

      1. [ROOT]/com
      2. [ROOT]/com/fr
      3. [ROOT]/com/es

      However I would like to get the following now (for back up and security purpose).

      1. [ROOT]/com
      2. [ROOT]/es
      3. [ROOT]/fr

      So now what can I do (I gues .htaccess) to open the folder [ROOT]/es when people clic on website.com/es ?

      It sounds stupid but I really don't know.

      I found this on internet but did not answer my needs.

      .htaccess

      RewriteEngine On
      RewriteCond %{REQUEST_URI} !(^/fr/.) [NC]
      RewriteRule ^(.
      )$ /sites/fr/$1 [L,R=301]

      Tks a lot !

      Florian

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

        somewhere on your root folder you will have a .htaccess file

        .htaccess is a small server file that you can put conditions in. some conditions will redirect to a "new"  location (your new folders) when the .htaccess detects a url to an "old" location. this is commonly called "mod rewrite".

        the software used to issue these commands varies based on your web site host. contact them and ask them what rewrite/redirection software is on your account (for example, one common one is  ISAPI rewrite:

        http://www.helicontech.com/isapi_rewrite/

        AymanH 1 Reply Last reply Reply Quote 0
        • AymanH
          AymanH @danrawk last edited by

          Hello !

          Tks you for your help ! I contacted them and now waiting for their answer.

          Let see what we can do 🙂

          Tks a lot

          1 Reply Last reply Reply Quote 0
          • Christy-Correll
            Christy-Correll last edited by

            Hi Flo - Were you able to resolve this issue?

            AymanH 1 Reply Last reply Reply Quote 0
            • AymanH
              AymanH @Christy-Correll last edited by

              Nop I just put all of them in the same folder but I would like to change it 😞

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • We switched the domain from www.blog.domain.com to domain.com/blog.
                Nigel_Carr
                Nigel_Carr
                0
                3
                170

              • Redirect our www.website.com to website. Com/target-keyword
                advertisingcloud
                advertisingcloud
                0
                4
                79

              • Http://newsite.intercallsystems.com/vista-series/sales@intercallsystems.com
                renalynd27
                renalynd27
                0
                7
                174

              • Blog.domain or domain.com/blog
                Asjad
                Asjad
                0
                7
                206

              • How to link site.com/blog or site.com/blog/
                matbennett
                matbennett
                0
                2
                107

              • Blog.furnacefilterscanada.com/ or furnacefilterscanada.com/blog/
                irvingw
                irvingw
                0
                3
                175

              • Main site is example.com but 301 redirects to example.com/
                SEO5Team
                SEO5Team
                0
                5
                243

              • To 301 redirect or not to 301 redirect? duplicate content problem www.domain.com and www.domain.com/en/
                Chris-CA
                Chris-CA
                0
                5
                456

              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