I'm using mod rewrite to access my PHP files in the root directory of my website indirectly. Currently, I have something like this,
RewriteRule ^(blog|about|page3|etc)$ /$1.php [L]
But what I would like to use is
RewriteRule ^(.*)$ /$1.php [L]
So that I wouldn't have to update my .htaccess file whenever I wanna add a new page to my website. The problem with this however is that it affects my subdirectories too. Which makes CSS, javascript, images unaccessable because it redirects to "/dir/example.png.php".
So what is the best solution here?