Sounds like your server does not know how to handle php files.
What happens if you directly visit index.php?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm working on an app using Laragon. I had everything working and progressing well. I ran into an issue with PHP version mismatches between Composer and my app that turned out to be a difference between the user and system $PATH environmental variables. But somewhere along the way I broke my site pointers to my app's public folder root.
Instead of bringing up my index blade like it used to, as directed by my controller and route, I'm getting an "Index of" file listing page. So, been there many times before, but this time the usual solutions are not working. This is not a situation where the server needs to have the public folder as it's root, it already does, it just needs to not list files and show the index blade. I'm getting a listing of the "virtual" public folder, just showing "storage". In the storage folder it just shows .gitnore and my images folder, so it's directory-listing my public folder.
FWIW here's my .htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/ [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
I can't figure out what I changed to make this happen and how to fix it. I know this is sorta vague, but any suggestions as to how I can fix or troubleshoot this will be very welcome.
Please or to participate in this conversation.