How to remove “public/index.php” from URL generated in Laravel
Option 1: Use .htaccess
If it isn’t already there, create an .htaccess file in the Laravel root directory. 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.