Redirect website to /index.php

Description of the problem

You have a website with the name domain.com – and you want to redirect all incomming urls that are going to domain.com/ to domain.com/index.php

Solution

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^$
RewriteCond %{HTTP_HOST} ^domain.com$
RewriteRule ^$ http://domain.com/index.php [L,R=301]