I'm trying to use a .htaccess file to redirect all requests to a single file, but I'm facing some problems.
My .htaccess looks like this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
My index.php file is in the same directory as the .htaccess file, and I also have a page1.php file in that directory. My problem is when I access:
localhost / pagina1.php
When I specify the file extension, it is processed, rather than redirecting to index.php
How could I even make the request redirect to the index.php file without affecting CSS and JS imports?