Configure clean URLs for Laravel using a rewrite rule to index.php
1 min readFeb 10, 2020
Add this code in below within .htaccess file
RewriteRule ^(.*)$ index.php?/$1 [L]
to
RewriteRule ^(.*)$ index.php/$1 [L]
based on the example URLs your provide. http://url.lar/index.php/about/ doesn’t have a question mark in it after index.php
It is also possible that mod_rewrite is not enabled. It looks like you are a Debian based system such as Ubuntu. You can use the command
sudo a2enmod rewrite
Read More: https://realprogrammer.in/configure-clean-urls-for-laravel-using-a-rewrite-rule-to-index-php/