magic is happening

.Htaccess to remove public from laravel app

create a .htaccess file in the root of your project and paste the following code in the file.

RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]

And you are all set to go. Happy coding.

PS: If you want a complete guide for hosting laravel project in a shared server you can it from here

Leave a Reply

Your email address will not be published. Required fields are marked *

Close
Social profiles