Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to remove index.php from url in Laravel PHP Fromework?

user-image
Question added by Rahul Sharma , PHP Developer , amazecreators.com
Date Posted: 2017/12/07
Rashedul Hoque
by Rashedul Hoque , Sr. Software Developer , Orko Health Ltd.

Create a .htaccess file your Laravel root directory if it does not exists already. (Normally it is under your public_html folder)

Edit the .htaccess file so that it contains the following code:

<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/$1 [L] </IfModule>

Now you should be able to access the website without the "/public/index.php/" part.

Thanks

More Questions Like This