Laravel / 00webhost error 404. The requested URL was not found on this server
1. Uploaded my files to 000webhost. I put all files from the shared folder in public_html , then I created a folder called laravel and there I downloaded all the other files. This is my directory structure:
Laravel
application
bootstrapping
configuration
....
public_html
index.html
.....
2. In my index.php file I have already changed some things to these
DIR required . '/../laravel/bootstrap/autoload.php';
$ app = require_once DIR . '/../laravel/bootstrap/app.php';
3. I also changed the .env and database.php file in the laravel / config folder
Problem:
Now I can access the home page of my site, but when I click links to other pages, a 404 error appears.
How to fix it?
And how do I access routes in api.php?
Thank!
source to share
Everything looks fine in your shows.
Make sure you also upload the .htaccess file located in / public (in your / public_html). The filename starts with a dot, so it is usually hidden. The purpose of this file is to tell Apache how to map urls to real files (everything should point to index.php in this case)
source to share