Reputation: 478
How to protect laravel app if I upload it to the public folder -'www' on my hosting ,I can't upload the app to the parent of 'www' folder because I previosly uploaded Laravel app folder to the parent directory of 'www', everything worked fine, exept mkdir() function doesn't work when laravel app is in the parent folder of 'www', so how can I protect Laravel app when its in the public folder?
Upvotes: 1
Views: 471
Reputation: 1
Put your Laravel application in 'www' folder and create the .htaccess
file in the root of your app. Make sure you have your mod_rewrite
module on.
#.htaccess
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
This will remove .../public/...
from URL.
Upvotes: 0