Search code examples
angularlaravelhttp-status-code-404shared-hosting

Shared Server (Laravel + Angular) - Laravel API routes work but get 404 on everything else


I've been at this for a little while and can't seem to find the issue. I have deployed a Laravel application which uses angular on the frontend, all works locally as intended. Since I have deployed it to a shared hosting service on hostinger, I get a 404 on all routes other then the /api/. It's like it can't locate the home blade. I have updated the autloader, I have tried several different htaccess's, I have updated all routes to use the new domain, I have updated the env file, all to no success.

I have attached some screenshots below of the set-up. Any help with this would be greatly appreciated.

File structure

public_html

htaccess

retromize_folder


Solution

  • It ended up being how the route was setup in my Web API. I was filtering based on the /API which was causing issues. Removing the filter got it working.