title: htaccess remove index.php from url/folder
body: <p>I have a problem and couldn't find a working solution on the internet. So hopefully you can help me.</p>
  
  <p>I need to make my website as SEO friendly as possible. Therefore I need to change the following</p>
  
  <pre><code>https://www.example.com/index.php
  https://www.example.com/folder/index.php
  https://www.example.com/folder/folder/index.php
  </code></pre>
  
  <p>To:</p>
  
  <pre><code>https://www.example.com/
  https://www.example.com/folder/
  https://www.example.com/folder/folder/
  </code></pre>
  
  <p>I need some kinda canonical redirect so that my website is only accessible without the /index.php in order to eliminate duplicate content.</p>
  
  <p>I would like to use .htaccess. Any help is very much appreciated.
  Thanks in advance.</p>