title: Server can't find files when htaccess forcefully removes .php from url
body: <p>I have managed to make pages work without the php extension but when I click links that have .php, it sends me to the URL with the .php extension.</p>
  
  <pre><code>##.php to noindex
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]
  
  RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
  RewriteRule (.*)$ /$1/ [R=301,L]
  
  RewriteRule ^([^/]+)/$ $1.php [L]
  
  RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php [L]
  </code></pre>
  
  <p>When I try to forcefully remove it with this, no js or css can be loaded:</p>
  
  <pre><code>RewriteCond %{ENV:REDIRECT_STATUS} !200
  RewriteRule (.*)\.php$ /$1 [R=301,L,QSA,NC]
  </code></pre>
  
  <p>Why is it not working?</p>