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 files

    .htaccess files

    Intermediate & Advanced SEO
    4 4 294
    • 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.
    • OnlineAssetPartners
      OnlineAssetPartners last edited by

      I am working with a clients website which has multiple htaccess files (.htaccess , .htaccess.holiding, and .htaccess.live -all in the same directory)

      My question is how does a server process these files? All 3 files?

      Currently the domain has 301 redirect showing for the home page to the mobile site (which is a problem) in one of the files (.htaccess but not others)

      Has anyone come across this before with regard to SEO problems?

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

        No, this is new to me. But this might help:

        .htaccess: how do multiple .htaccess files work?

        http://stackoverflow.com/questions/7892921/htaccess-how-do-multiple-htaccess-files-work

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

          On your web server there is a configuration file that ends in ".conf". This file will have settings for the virtual host, it will look something like this:

          <virtualhost></virtualhost>

          ServerAdmin     webmaster@example.com

          DocumentRoot    /var/www/html/example.com/public_html/

          ServerName      example.com

          ServerAlias     www.example.com

          AccessFileName .htaccess

          The web server should only be using a single .htaccess file. The value for the AccessFileName will identify which .htaccess file your server is using. The other files (.htaccess.holding and .htaccess.live) look like they may have been previous versions of your current .htaccess file.

          Whichever file is located in this configuration file is the one you will need to edit to fix your issue. From my perspective, you should then be able to delete the other .htaccess files if you want to. You could choose to save a backup in case you feel you may ever need them in the future.

          Hope this helps!

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

            Guess, those are just backups of the htaccess file...

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • 301 Redirects for Multiple Language Sites in htaccess File
              GFD_Chris
              GFD_Chris
              0
              2
              120

            • Disavow File
              KevinBudzynski
              KevinBudzynski
              0
              3
              38

            • Hacked website - Dealing with 301 redirects and a large .htaccess file
              ChrisAshton
              ChrisAshton
              0
              6
              374

            • FIle Names
              WhoWuddaThunk
              WhoWuddaThunk
              0
              2
              45

            • .htaccess newby
              GlobalLingo
              GlobalLingo
              0
              16
              334

            • Are htm files stronger than aspx files?
              Khem_Raj7
              Khem_Raj7
              0
              6
              705

            • Modify .htaccess
              Highland
              Highland
              0
              10
              466

            • .htaccess code ?
              Marcus_Miller
              Marcus_Miller
              0
              2
              485

            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