Does your vhost has the public folder as root dir ? Does it allows for .htaccess file ?
Also maybe you havn't mod rewrite enabled
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have just launched a Laravel 5 project on a live server and all is going well except for one thing.
I need to write /index.php/ in the url to access any page other than the home page.
For example
sitename/ -- this works fine
sitename/index.php -- this also works fine
sitename/about -- This causes a server 404
sitename/index.php/about -- this works fine
I suspect this is an issue with the .htaccess file but I'm a little out of my comfort zone in this area.
Here is the .htacccess I'm using.
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
This is the .htaccess that came with the install. I haven't changed anything. (Any changes have been reverted.)
Does anyone have any insight into this?
Please or to participate in this conversation.