I would like to use .htaccess to set a rule where if config.php exists then set root directory to / and if config.php does not exist, set root directory to /install.
How can this be done?
Thanks!
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/config.php !-f
RewriteRule ^/?$ /install [L]
This will set /install as your home dir if /config.php does not exist in your filesystem.