php-Laravel / 00webhost错误404.在此服务器上找不到请求的URL

1.
将我的文件上传到000webhost.我将所有文件从公用文件夹放置到public_html,然后创建了一个名为laravel的文件夹,并在那里上传了所有其他文件.这是我的目录的结构:

laravel

app

bootstrap

config

….

  
  public_html
  
  

index.html

…..

2.
在我的index.PHP文件中,我已经更改了一些内容

  • require DIR.’/../laravel/bootstrap/autoload.PHP’;

  • $app = require_once DIR.’/../laravel/bootstrap/app.PHP’;

3.
我还更改了laravel / config文件夹中的.env文件database.PHP

问题:

I am Now able to access the home page of my site, but when I click my links to the other pages error 404 shows up.

How do I fix this?

And how do I access the routes in my api.PHP ?

谢谢!

解决方法:

您的收录似乎还不错.

确保您还上传了位于/ public(在/ public_html中)的.htaccess文件.文件名以点开头,因此通常是隐藏的.
文件的目的是指示Apache如何将URL映射到实际文件(在这种情况下,所有内容都应指向index.PHP)

相关文章

laravel的dd函数不生效怎么办
看不懂laravel文档咋办
安装laravel框架出现command怎么办
Laravel开发API怎么使用事务
laravel怎么构建复杂查询条件
laravel如何实现防止被下载