title: Removing the .php file extension from the URL Request
body: <p>I am trying to beautify my URLs and want to get rid of the .php file extension. I've found a couple of other questions here such as this one (<a href="https://stackoverflow.com/questions/41019584/removing-the-php-file-type-extension">Removing the PHP file type extension</a>) But none of the suggestions work for me. They send me to my 404.php or do not change the URL at all.</p>
  
  <p>I figure the entire RewriteEngine code in my htaccess as a whole is conflicting in itself.</p>
  
  <p>Here's what I got so far,</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
  
      RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
      RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
  
      RewriteCond %{SERVER_PORT} !^443$
      RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  
  
      RewriteBase /
      RewriteRule ^index\.php$ - [R]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /404.php [R]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I would like my domains to look like </p>
  
  <blockquote>
    <p><a href="https://www.example.com/about" rel="nofollow noreferrer">https://www.example.com/about</a></p>
  </blockquote>