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. .htacess file format for Apache Server

    .htacess file format for Apache Server

    Technical SEO Issues
    5 3 937
    • 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.
    • karthik-175544
      karthik-175544 last edited by

      Hi,

      My website having canonical issue for home page, I have written the .htaccess file and upload the root directory. But still I didn't see any changes in the home page. I am copying syntax which one I have written in the .htaccess file. Please review the syntax and let me know the changes.

      Options +FollowSymlinks RewriteEngine on #RewriteBase /

      re-direct index.htm to root / ### RewriteCond %{THE_REQUEST} ^./index.htm\ HTTP/ RewriteRule ^(.)index.htm$ /$1 [R=301,L]

      re-direct IP address to www ### re-direct non-www to www ### re-direct any parked domain to www of main domain RewriteCond %{http_host} !^www.metricstream.com$ [nc] RewriteRule ^(.*)$ http://www.metricstream.com/$1 [r=301,nc,L]

      Is there any specific htaccess file format for apache server?

      Thanks,

      Karthik

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

        Hi, there is something: http://httpd.apache.org/docs/1.3/howto/htaccess.html, A tutorial: http://www.freewebmasterhelp.com/tutorials/htaccess/1

        And some examples here:

        http://knowledge.freshpromo.ca/seo-tools/301-redirect.php

        http://www.seo-consultant-services.co.uk/301-redirects-www-non-www-canonical-problems.html

        http://www.dailyblogtips.com/how-to-setup-a-301-redirect/

        http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm

        First example best describes what you need, cannonical redirect

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

          Hi! I'm following up on older Q&A questions. Did any of the resources from the earlier post help you out, or is there anything we can do to help you get this redirect implemented?

          karthik-175544 1 Reply Last reply Reply Quote 0
          • karthik-175544
            karthik-175544 @KeriMorgret last edited by

            Hi Keri,

            Thanks for your message. I didn't find solution for the redirection. It would be great if you help me to fix that issue. How we can do the SEO friendly redirection (301) in tomcat server?

            Karthik

            KeriMorgret 1 Reply Last reply Reply Quote 0
            • KeriMorgret
              KeriMorgret @karthik-175544 last edited by

              Hi Karthik,

              I'd recommend posting a new Q&A question about this, as this is now a few months old and a bit buried. You might hold off until Tuesday US time, since we have a holiday tomorrow and there won't be nearly as many people online.

              When you do write your question, it would be helpful to add to your post what types of errors you get when you try to implement this -- just what you have tried, and what the results are.

              I also see that your site doesn't redirect non-www to www. If you want to fix that too, now would be a good time to ask about it.

              Keri

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • Robots File
                Hurf
                Hurf
                0
                3
                60

              • Multiple robots.txt files on server
                peakdistrictseo
                peakdistrictseo
                0
                8
                2.4k

              • Site Migration from One Dev. and Server to Another Dev. and Server
                LoganRay
                LoganRay
                0
                10
                245

              • 301 Redirect keep html files on server?
                _Heiko_
                _Heiko_
                0
                6
                171

              • Can the Hosting location of image files have a negative effect if on the developers own media server rather than on client site server ?
                ReferralCandy
                ReferralCandy
                0
                3
                141

              • Can anyone speak to the pros and cons of installing mod_expire on an Apache server?
                BlueprintMarketing
                BlueprintMarketing
                1
                12
                1.5k

              • Help writing a .htacess file with the correct 301 redirects
                mememax
                mememax
                0
                5
                148

              • Submitting Sitemap File vs Sitemap Index File
                AU-SEO
                AU-SEO
                0
                5
                1.4k

              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