Remove index.php from URL - Laravel

When accessing Laravel in browser, the URL contains "index.php" OR "public/index.php". Having these in URL is not a good SEO practice.

To remove "index.php" from URL, you can write a small code snippet in ".htaccess" file located at "public/" directory.

Method #1: