undefined
Skip to content
Moz logo Menu open Menu close
  • Products
    • Moz Pro
    • Moz Pro Home
    • Moz Local
    • Moz Local Home
    • STAT
    • Moz API
    • Moz API Home
    • Compare SEO Products
    • Moz Data
  • Free SEO Tools
    • Domain Analysis
    • Keyword Explorer
    • Link Explorer
    • Competitive Research
    • MozBar
    • More Free SEO Tools
  • Learn SEO
    • Beginner's Guide to SEO
    • SEO Learning Center
    • Moz Academy
    • SEO Q&A
    • Webinars, Whitepapers, & Guides
  • Blog
  • Why Moz
    • Agency Solutions
    • Enterprise Solutions
    • Small Business Solutions
    • Case Studies
    • The Moz Story
    • New Releases
  • Log in
  • Log out
  • Products
    • Moz Pro

      Your all-in-one suite of SEO essentials.

    • Moz Local

      Raise your local SEO visibility with complete local SEO management.

    • STAT

      SERP tracking and analytics for enterprise SEO experts.

    • Moz API

      Power your SEO with our index of over 44 trillion links.

    • Compare SEO Products

      See which Moz SEO solution best meets your business needs.

    • Moz Data

      Power your SEO strategy & AI models with custom data solutions.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Free SEO Tools
    • Domain Analysis

      Get top competitive SEO metrics like DA, top pages and more.

    • Keyword Explorer

      Find traffic-driving keywords with our 1.25 billion+ keyword index.

    • Link Explorer

      Explore over 40 trillion links for powerful backlink data.

    • Competitive Research

      Uncover valuable insights on your organic search competitors.

    • MozBar

      See top SEO metrics for free as you browse the web.

    • More Free SEO Tools

      Explore all the free SEO tools Moz has to offer.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Learn SEO
    • Beginner's Guide to SEO

      The #1 most popular introduction to SEO, trusted by millions.

    • SEO Learning Center

      Broaden your knowledge with SEO resources for all skill levels.

    • On-Demand Webinars

      Learn modern SEO best practices from industry experts.

    • How-To Guides

      Step-by-step guides to search success from the authority on SEO.

    • Moz Academy

      Upskill and get certified with on-demand courses & certifications.

    • SEO Q&A

      Insights & discussions from an SEO community of 500,000+.

    Unlock flexible pricing & new endpoints
    Moz API

    Unlock flexible pricing & new endpoints

    Find your plan
  • Blog
  • Why Moz
    • Small Business Solutions

      Uncover insights to make smarter marketing decisions in less time.

    • Agency Solutions

      Earn & keep valuable clients with unparalleled data & insights.

    • Enterprise Solutions

      Gain a competitive edge in the ever-changing world of search.

    • The Moz Story

      Moz was the first & remains the most trusted SEO company.

    • Case Studies

      Explore how Moz drives ROI with a proven track record of success.

    • New Releases

      Get the scoop on the latest and greatest from Moz.

    Surface actionable competitive intel
    New Feature

    Surface actionable competitive intel

    Learn More
  • Log in
    • Moz Pro
    • Moz Local
    • Moz Local Dashboard
    • Moz API
    • Moz API Dashboard
    • Moz Academy
  • Avatar
    • Moz Home
    • Notifications
    • Account & Billing
    • Manage Users
    • Community Profile
    • My Q&A
    • My Videos
    • Log Out

The Moz Q&A Forum

  • Forum
  • Questions
  • Users
  • Ask the Community

Welcome to the Q&A Forum

Browse the forum for helpful insights and fresh discussions about all things SEO.

  1. Home
  2. SEO Tactics
  3. Technical SEO
  4. 301 for "index.php" in Web.config?

Moz Q&A is closed.

After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

301 for "index.php" in Web.config?

Technical SEO
3
6
3.5k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as question
Log in to reply
This topic has been deleted. Only users with question management privileges can see it.
  • tdsnet
    tdsnet last edited by Nov 17, 2011, 7:42 AM

    Hi there, I'm trying to create a 301 redirect for the file "index.php" but I keep getting a "fail to redirect" message in Firefox whenever I insert it into the Web.config file.

    <location path="index.php"></location>

    Is there anyway around this? Thanks for any help

    According to Open Site Explorer, there are about 500 links to my index file but it only has a 302 status so will not be passing link juice.

    1 Reply Last reply Reply Quote 0
    • tdsnet
      tdsnet @AlanMosley last edited by Nov 17, 2011, 11:36 AM Nov 17, 2011, 11:36 AM

      Hi Alan,

      Thanks for that, it worked perfectly!

      1 Reply Last reply Reply Quote 0
      • AlanMosley
        AlanMosley last edited by Nov 17, 2011, 11:37 AM Nov 17, 2011, 11:22 AM

        Yannick seems to have it right, but here is another way

        <system.webserver><rewrite><rules><rule name="DefaultRule" stopprocessing="true"><match url="^index.php"><action type="Redirect" url="/"  =""></action></match></rule></rules></rewrite></system.webserver>

        tdsnet 1 Reply Last reply Nov 17, 2011, 11:36 AM Reply Quote 1
        • YannickVeys
          YannickVeys @tdsnet last edited by Nov 17, 2011, 10:03 AM Nov 17, 2011, 10:03 AM

          Did you add/activate all the right plugins/dll files?

          1 Reply Last reply Reply Quote 0
          • tdsnet
            tdsnet @YannickVeys last edited by Nov 17, 2011, 9:56 AM Nov 17, 2011, 9:56 AM

            Thanks Yannick,

            I'm using the configuration tag and there isn't a CMS being used. The page is accessible via index.php, but I'm currently redirecting it using a PHP script (this is fine but it doesn't provide a 301 redirect).

            I'd hopefully like to replace this using the web.config file but it only results in an internal server error or an infinite loop.

            Thanks again.

            YannickVeys 1 Reply Last reply Nov 17, 2011, 10:03 AM Reply Quote 0
            • YannickVeys
              YannickVeys last edited by Nov 17, 2011, 8:18 AM Nov 17, 2011, 8:18 AM

               <configuration><location path="index.php"></location></configuration> 
              

              Did you add the configuration part?

              Is your home page available on the / part of your domain? Or is it only accessible via index.php? What CMS are you using?

              tdsnet 1 Reply Last reply Nov 17, 2011, 9:56 AM Reply Quote 0
              • 1 / 1
              1 out of 6
              • First post
                1/6
                Last post

              Got a burning SEO question?

              Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


              Start my free trial


              Browse Questions

              Explore more categories

              • Moz Tools

                Chat with the community about the Moz tools.

              • SEO Tactics

                Discuss the SEO process with fellow marketers

              • Community

                Discuss industry events, jobs, and news!

              • Digital Marketing

                Chat about tactics outside of SEO

              • Research & Trends

                Dive into research and trends in the search industry.

              • Support

                Connect on product support and feature requests.

              • See all categories

              Related Questions

              • CREW-MARKETING

                Quick Fix to "Duplicate page without canonical tag"?

                When we pull up Google Search Console, in the Index Coverage section, under the category of Excluded, there is a sub-category called ‘Duplicate page without canonical tag’.  The majority of the 665 pages in that section are from a test environment. If we were to include in the robots.txt file, a wildcard to cover every URL that started with the particular root URL ("www.domain.com/host/"), could we eliminate the majority of these errors? That solution is not one of the 5 or 6 recommended solutions that the Google Search Console Help section text suggests.  It seems like a simple effective solution.  Are we missing something?

                Technical SEO | Nov 13, 2018, 1:07 PM | CREW-MARKETING
                1
              • measurableROI

                Where did the "Location" go, on Google SERP?

                In order to emulate different locations, I've always done a Google query, then used the "Location" button under "Search Tools" at the top of the SERP to define my preferred location.  It seems to have disappeared in the past few days?  Anyone know where it went, or if it's gone forever?  Thanks!

                Technical SEO | Dec 18, 2015, 1:20 PM | measurableROI
                0
              • tbinga

                Schema markup for products is missing "price": Is this bad?

                Hey guys, So a current client of mine has an e-commerce shop with a few hundred products. They purposely choose to keep the prices off of their website, which is causing errors in Google Webmaster Tools. Basically the error shows: Error: Structured Data > Product (markup: schema.org) Error type: missing price 208 items with error Is this a huge deal? Or are we allowed to have non-numerical prices for schema ie. "call for quote"

                Technical SEO | Aug 29, 2014, 4:15 PM | tbinga
                1
              • melen

                Staging site and "live" site have both been indexed by Google

                While creating a site we forgot to password protect the staging site while it was being built.  Now that the site has been moved to the new domain, it has come to my attention that both the staging site (site.staging.com) and the "live" site (site.com) are both being indexed.  What is the best way to solve this problem?  I was thinking about adding a 301 redirect from the staging site to the live site via HTACCESS. Any recommendations?

                Technical SEO | Sep 16, 2013, 6:51 PM | melen
                0
              • Jeepster

                Rel="Follow"? What the &#@? does that mean?

                I've written a guest blog post for a site. In the link back to my site they've put a rel="follow" attribute. Is that valid HTML? I've Googled it but the answers are inconclusive, to say the least.

                Technical SEO | Feb 15, 2013, 4:58 PM | Jeepster
                0
              • eli.boda

                Does the rel="bookmark" tag have any SEO impication?

                I'm assuming the rel="bookmark" tag doesn't have any SEO implications but I just wanted to make sure it wasn't viewed like a nofollow by search engines.

                Technical SEO | Jul 6, 2012, 11:13 PM | eli.boda
                0
              • EugeneF

                404 crawl errors from "tel:" link?

                I am seeing thousands of 404 errors.  Each of the urls is like this: abc.com/abc123/tel:1231231234 Everything is normal about that url except the "/tel:1231231234" these urls are bad with the tel: extension, they are good without it. The only place I can find this character string is on each page we have this code which is used for Iphones and such.  What are we doing wrong? Code: Phone: <a href="[tel:1231231234](tel:7858411943)"> (123) 123-1234a>

                Technical SEO | Feb 20, 2012, 8:01 PM | EugeneF
                0
              • RogersSEO

                /index.php in sitemap? take it out?

                Hi Everyone, The following was automatically generated at xml-sitemaps.com Should I get rid of the index.php url from my sitemap?  If so, how do I go about redirecting it in my htaccess ? <url><loc>http://www.mydomain.ca/</loc></url>
                <url><loc>http://www.mydomain.ca/index.php</loc></url> thank you in advance, Martin

                Technical SEO | Jun 20, 2011, 3:01 PM | RogersSEO
                0

              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
              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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
              • Accessibility
              • Terms of Use
              • Privacy

              Looks like your connection to Moz was lost, please wait while we try to reconnect.