I can’t find any information whatsoever about performing a Laravel installation in a subfolder.
Is it even possible to do this? Or is it a Laravel requirement to be installed at root level?
My hosting provider doesn’t allow me to create VirtualHosts, and I need to install a Laravel application alongside what’s currently up there…
UDPATE: turns out it was mainly an .htaccess issue:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
First, take in consideration that this answer is just to make it work, I am not sure about any implications this may have in security due to every folder being in the public part of your site.
Second, I just tried this with a barebones laravel installation, so I’m not sure if this can have effects later in development (my guess is not, but you never know).
1) Copy all the contents of the
publicfolder in the root laravel folder (which is your subfolder)2) You can now remove the empty
publicfolder3) edit
index.phpand changeto
4) edit paths.php and change
to
5) Edit the .htaccess file in the laravel folder to make it redirect no more into public