Just a guess, but you probably didn't correctly point to public as the document root.
Myself and others have showed many times here on the forum how to correctly setup laravel.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I uploaded a laravel project on a shared hosting with Cpanel and it was working at first but after few minutes it was redirecting to a spam site and a redirect code was added in .htaccess. I deleted all files and reupload them but it happened again and deleting the redirect code didn't work. How is get hacked and what's the solution to solve this my site url: owjedanesh.com
Please or to participate in this conversation.