title: Redirect loop with simple htaccess rule
body: <p>I have been pulling my air out over this. It worked before the server migration!</p>
  
  <p>Ok so basically it's as simple as this:</p>
  
  <p>I have a .php file that I want to view the content of using a SEO friendly URL via a ReWrite rule.</p>
  
  <p>Also to canonicalise and to prevent duplicate content I want to 301 the .php version to the SEO friendly version.</p>
  
  <p>This is what I used and has always worked till now on the new server:</p>
  
  <pre><code>RewriteRule ^friendly-url/$ friendly-url.php [L,NC]
  RewriteRule ^friendly-url.php$ /friendly-url/$1 [R=301,L]
  </code></pre>
  
  <p>However disaster has struck and now it causes a redirect loop.</p>
  
  <p>Logically I can only assume that in this version of Apache it is tripping up as it's seeing that the script being run is the .php version and so it tries the redirect again.</p>
  
  <p>How can I re-work this to make it work? Or is there a config I need to switch in WHM?</p>
  
  <p>Thanks!!</p>