I was going through all possible sample on internet to solve this. Still it is an headache.
I just want to avoid the 'public' in www.mylaravelsite.com/public/
and make it like www.mylaravelsite.com
for the root directory.
Now I do not want to avoid the security concern,So I learned .htaccess
would be the best way.
Any solution friends ?
& advance thanks for interacting !
Let's assume you have this folder structure in your server
And the laravel folder structure is
You can create a folder name mylaravelsite on your server inline with
public_html
andpublic_ftp
folder, and copy to it the whole laravel application except the public folder because you will paste all of it contents on thepublic_html
, so you have now:On your
public_html/index.php
change the following line:to
and also don't forget to change
/mylaravelsite/bootstrap/paths.php
public path, you might use it.to
Your site should be running.