I'm looking to use .htaccess to redirect to one page or another based on if a file exists in the directory.

Basically I need all visitors to index.php to be sent to either home.php page if splash.php **does not** exist or splash.php page if splash.php **does** exist in the directory, so far i have this...

```
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} index.php
RewriteCond %{DOCUMENT_ROOT}/splash.php -f
RewriteCond %{SCRIPT_FILENAME} !splash.php
RewriteRule ^.*$ /splash.php [L]

```

This sends visitors to mysite.com/splash.php if it exists only if I specifically have mysite.com/index.php as my URL, it doesn't work if just use the mysite.com URL.

I understand the first 3 lines of my code, but not the !splash.php -f bit (i got that from some other redirect code i found on SO).

How do i redirect to home.php if splash.php not present?

Cheers!