Laravel 5 - delete / publish by url

I point everything to the / public folder with this .htaccess.

RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]

This is normal, I can load / administer the path without / public, but the problem is that I can also upload it like this / public / administration.

+4
source share
2 answers

If I understand correctly, it looks like your virtual host configuration points to the directory above public. What for? Do you need this for some reason?

Laravel should work out of the box with Apache if your document root is installed in a public directory. This is why there is a default .htaccess file in this directory.

+1
source

Try this alternative .htaccessfile:

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

: Laravel §a > #Pretty Urls

+2

All Articles