I'm using laravel routes
, and I have a problem with URL
for example
https://laracasts.com/discuss
. - URL has a double
https://laracasts.com/index.php/discuss
how to fix it?enter image description here
I'm using laravel routes
, and I have a problem with URL
for example
https://laracasts.com/discuss
. - URL has a double
https://laracasts.com/index.php/discuss
how to fix it?enter image description here
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)
Now you should be able to access the website without the "/public/index.php/" part.
Edit the .htaccess file so that it contains the following code:
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>