Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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

user-image
Question ajoutée par Rahul Sharma , PHP Developer , amazecreators.com
Date de publication: 2017/12/07
Rashedul Hoque
par 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