I set up .htaccess file to redirect to the _install folder if the app is just downloaded.
The problem I'm having is if the App was uploaded to a folder other than the root folder, the redirection break. It tries to go to the root folder
RewriteEngine on
#allow installation
RewriteCond %{REQUEST_URI} !^/_install
#redirect to _install if vendor does not exist
RewriteCond %{DOCUMENT_ROOT}/vendor !-d
RewriteRule ^(.*) /_install [L,redirect=302]
#start application if vendor exists
#allow installation to continue
RewriteCond %{REQUEST_URI} !^/_install
RewriteCond %{DOCUMENT_ROOT}/vendor -d
RewriteRule ^(.*) public/$1 [L]
so if the App is in the folder /project
it redirects to /_install
instead of /project/_install
.
How do I make sure no matter what folder the App is, it will take everything from that folder?