title: Stop .htaccess from redirecting root to root/index
body: <p>I have somehow managed to redirect my site from domain.com/ to domiain.com/index and I was hoping someone could take a look at my .htaccess code to see where I have gone wrong. </p>
  
  <p>Quick background story</p>
  
  <ol>
  <li>I had an old website where all files were html</li>
  <li>I then bundled all those files into a folder called old and told all
  bots via robots.txt not to crawl it. robots.txt remains in the root
  folder </li>
  <li>A bunch of .php files were then added to the root folder. Each file has its own rel="canonical" tag with href="http://domain-name.com/file-name" - the homepage rel="canonical" ends with /index</li>
  <li>Inside the root folder, I created a .htaccess file that:
  
  <ul>
  <li>Redirected .html files to the correct .php file</li>
  <li>Redirect index.php to root (this does not seem to work)</li>
  <li>Redirect www to non-www</li>
  <li>Remove php file extension</li>
  </ul></li>
  </ol>
  
  <p>I've tried to re-order the code in case I'm, for example, trying to remove extensions before properly redirecting but nothing seems to work. </p>
  
  <p>I've tried playing around with how I'm redirecting index to index and nothing seems to work. </p>
  
  <p>To see what the redirect path looks like I opened Chromes developer tools and selected network. From there I typed in </p>
  
  <pre><code>http://www.domain-name.com/index.html
  </code></pre>
  
  <p>And the redirect path looked like this    </p>
  
  <pre><code>http://www.domain-name.com/index.html
  
  http://domain-name.com/index.html
  
  http://domain-name.com/index (this is my index.php file)
  </code></pre>
  
  <h2>My htaccess code</h2>
  
  <h1>301 Redirects Old HTML over to new PHP</h1>
  
  <pre><code>Redirect 301 /index.html http://domain-name.com/index 
  Redirect 301 /about_us.html http://domain-name.com/about
  Redirect 301 /services.html http://domain-name.com/services
  </code></pre>
  
  <h1>Redirect index.php to root</h1>
  
  <pre><code>RewriteCond %{THE_REQUEST} ^.*/index.php 
  RewriteRule ^(.*)index.php$ http://domain-name.com/$1 [R=301,L]
  </code></pre>
  
  <h1>Redirect www to non-www</h1>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine on
  RewriteCond %{HTTP_HOST} ^www\.domain-name\.com [NC]
  RewriteRule ^(.*)$ http://domain-name.com/$1 [L,R=301]
  &lt;/IfModule&gt;
  </code></pre>
  
  <h1>remove php file extension</h1>
  
  <pre><code>RewriteEngine on 
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME}\.php -f
  RewriteRule ^(.*)$ $1.php [NC,L]
  </code></pre>
  
  <p>I'm not sure what I have done wrong but I'm hoping you can help me understand why the homepage is redirecting to </p>
  
  <pre><code>http://domain-name.com/index
  </code></pre>
  
  <p>Thank you for your time</p>