简体   繁体   中英

laravel route not found on live server

My laravel app work in localhost but when I try to deploy on Shared hosting without ssh my route app not work, just '/' URL is work but when I call any route it returns 'Not found' "the request URL/myappName/Middleware/routeName was not found on this server"

and I moved public content to root folder and changed directory for "vendor and bootstrap"

Kindly read through this:

  1. Make sure the Version of php on the shared hosting is higher or equal to the version of php your laravel is using.
  2. After uploading the files, got to the public folder and move all the files in it to the root directory. then, go to index.php and find the following lines
require __DIR__.'/../vendor/autoload.php';
and 
$app = require_once __DIR__.'/../bootstrap/app.php';

modify the by removing /.. from each so that they look like the lines below

require __DIR__.'/vendor/autoload.php';

$app = require_once __DIR__.'/bootstrap/app.php';

Then check the url again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM