I need to send a user to "/index.php" when they don't specify a file in the URL.
This is probably a really simple fix because I know it's a common problem, and I've tried multiple answers on SO, though they didn't work.
Here's what some examples of what I've tried
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php
OR
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php [NC,L,QSA]
OR
DirectoryIndex index.php
This is the rest of the htaccess file which I need to whitelist a few files that should be open, everything else should not be accessed.
Order deny,allow
Deny from all
<FilesMatch "index\.php|logout\.php|login\.php|main\.css|logo2\.png|bg\.jpg|logoAuth\.png|favicon\.ico|grafikk_venstreNede\.png|grafikk_hoyreMidt\.png">
Allow from all
</FilesMatch>
Expected result is calling "domain.com" and the server responds with "domain.com/index.php"
Any help would be greatly appreciated!