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. 301 Redirect Question for trailing slash & index.php

    301 Redirect Question for trailing slash & index.php

    Technical SEO Issues
    3 2 973
    • 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.
    • anoopbal
      anoopbal last edited by

      1. Can you show me how to do a redirect for forhttp://www.exercisebiology.com to http://www.exercisebiology.com/  I want to add the trailing slash.

      2. Also how to redirect  from http://www.exercisebiology.com/in...

      to http://www.exercisebiology.com/.

      When I tried to redirect the index.php last time, I couldn't login to the forums. Everytime when someone tries to login to my forums, it takes them the to the home page. I did it through the hostgator CP. I am thinking someone could help me here.

      Thank you so much!

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

        **When I tried to redirect the index.php last time, I couldn't login to the forums. Everytime when someone tries to login to my forums, it takes them the to the home page. **

        The first thing you should clearly understand is altering your htaccess file is not something which should be done except by professionals who understand the Regex language used and how htaccess works. If you make an error your website can become instantly unavailable, or worse you can open up a security gap in your site and it may be exploited at a much later time.

        Additionally, not only the code matters but exactly where the code is placed within the htaccess file. I would recommend contacting your developer or web host for assistance. With that above understood, here are links to two articles which share instructions on how to achieve the results you desire:

        Add trailing slash: http://enarion.net/web/htaccess/trailing-slash/

        Redirect index.php to root: http://www.askapache.com/htaccess/redirect-index-blog-root.html

        anoopbal 1 Reply Last reply Reply Quote 0
        • anoopbal
          anoopbal @RyanKent last edited by

          I asked my hostagtor customer service and he said I cannot add the trailing sash since it will create a infinite loop.

          And I added the index.php through the hostagtor control panel where it has a form which you can fill. And it automatically  writes the code.

          I am just confused about the trailing slash code in the article.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Trailing slash on the main website - do i need a 301 ? Is my 301 correct?
            advertisingcloud
            advertisingcloud
            0
            4
            109

          • 301 Redirect Question
            RobCairns
            RobCairns
            0
            3
            131

          • 301 redirect question
            TheeDigital
            TheeDigital
            0
            5
            128

          • Redirect a 301 Redirect
            RedCaffeine
            RedCaffeine
            0
            5
            98

          • 301 Redirect with index.asp
            TroyW
            TroyW
            0
            37
            1.4k

          • Why are my URL's with a trailing slash still getting indexed even though they are redirected in the .htaccess file?
            irvingw
            irvingw
            0
            3
            288

          • Index.php and 301 redirect with Joomla
            SanketPatel
            SanketPatel
            0
            2
            2.1k

          • Trailing slash 301 redirect code
            jamesjackson
            jamesjackson
            0
            10
            5.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