title: How to redirect filename.php to /friendly-url for the same filename.php?
body: <p>I have link to filename.php in my site. I want that when someone enters this page via the example.com/filename.php it will redirect him (301) to example.com/friend-url and display the content of filename.php</p>
  
  <p>I have tried this:</p>
  
  <pre><code>RewriteEngine On
  
  RewriteCond %{HTTP_HOST} !^www\. [NC]
  RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  
  RewriteCond %{HTTPS} off
  RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
  
  Redirect 301 /filename.php$ /furl
  RewriteRule ^furl$ /filename.php 
  </code></pre>
  
  <p>But the page isn't loading at all.</p>