Removing Public from Laravel URL

Here is how you can easily create a better looking URL when using Laravel.

 

Remove public from Laravel url

When you first set up Laravel the index page shows up as

http://my-domain.com/public

To fix this and get a better looking URL that shows up like

http://my-domain.com

you have to make these two easy changes.

  1. Rename server.php in your Laravel root folder to index.php
  2. Copy the .htaccess file from /public directory to your Laravel root folder.

 

That’s is it..  It is that easy.

Do you need assistance with develping a Laravel Application? Contact Me

Leave a Reply

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