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. I need some HTACCESS help (Magento)

    I need some HTACCESS help (Magento)

    Technical SEO Issues
    6 3 938
    • 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.
    • netviper
      netviper last edited by

      Hi Guys,

      I need some help on this htaccess issue in Magneto.

      So here is what I am trying to do:

      I wanted to change mysite.com/index.php/etc to mysite.com/etc

      so I turned on the web friend URLS.

      That did that, BUT there are still two versions of every page on the site.

      www.mysite.com/etc and mysite.com/index.php/etc

      So that isn't good for SEO.

      So then I applied a 301 matching redirect, RedirectMatch 301 /index.php/(.*) http://www.mysite.com/$1

      That solved that problem.

      But now I am not able to log into the admin.

      It is mysite.com/index.php/pg45admin.  It should redirect to mysite.com/pg45admin but the page just hangs.... It goes into a continuous loop.

      I tired using the custom URL and then the site crashed and I had to redo it.

      So what do I need to do for this to work?

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

        I have no experience with Magneto, but I have always been able to configure friendly URLs on any system.

        If I was in your situation I would do the following:

        1. rename your htacess file to .htaccess.old (basically this is the same as deleting it but you would still retain a copy)

        2. google "Magento friendly URLs" and follow the guides. I found a few:

        http://kb.siteground.com/article/Enable_Friendly_URLs_in_Magento.html

        At worst, there are a few plugins which do what you are after

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

          Hi Ryan,

          Thanks for the response, but I had already turned on web friendly URLs.  All that did was removed the index.php from the URL.  Both URL's stlll exist.

          Before web friendly URL's it was like this:

          mysite.com.index.php/etc/etc

          after

          mysite.com/etc/etc

          Since both URL's exist, I just want to 301 redirect any index.php URL to the URL without it.

          I have not found any plugin to do what I am looking to do.

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

            In that case you need the couple lines of htaccess code to redirect any index.php page to it's equivalent. I am not a regex/htaccess pro and do not know the code for it off-hand.

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

              Yes, that is what I am looking for.

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

                Oh my goodness Dave,

                I just saw your question and then noticed the date you posted!

                Do you still need help with your question, or have you resolved the problem? (I really hope so)

                If not, let us know.

                Sha

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                • Need help with rel canonical!
                  Dr-Pete
                  Dr-Pete
                  0
                  3
                  92

                • Need Urgent Help
                  MiriamEllis
                  MiriamEllis
                  0
                  6
                  131

                • I need help compiling solid documentation and data (if possible) that having tons of orphaned pages is bad for SEO - Can you help?
                  danatanseo
                  danatanseo
                  0
                  15
                  726

                • SEO Yoast Help Needed
                  Force7
                  Force7
                  0
                  3
                  341

                • Need Help writing 301 redirects in .htaccess file
                  Dr-Pete
                  Dr-Pete
                  0
                  5
                  1.3k

                • Help needed please with 301 redirects in htaccess file.
                  petersommertravels
                  petersommertravels
                  0
                  9
                  2.3k

                • .htaccess help please
                  Dr-Pete
                  Dr-Pete
                  0
                  3
                  461

                • Need Help With Robots.txt on Magento eCommerce Site
                  Francisco_Meza
                  Francisco_Meza
                  0
                  4
                  5.3k

                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