1

I am new in laravel I am just try to remove index.php in each route such as https://localhost/test/public/index.php/test1 into https://localhost/test/public/test1. I can used mod_rewrite code to solve this issue but does not work. My code in .htaccess file which can be inside public folder is as follow:-

Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

It shows error

The requested URL /test/public/test1 was not found on this server
Pawan Dongol
  • 1,098
  • 3
  • 16
  • 32
  • Possible duplicate of [htaccess remove index.php from url](http://stackoverflow.com/questions/4365129/htaccess-remove-index-php-from-url) – Joe Aug 18 '16 at 10:53

1 Answers1

0

Try this

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php
Michail M.
  • 735
  • 5
  • 11