简体   繁体   中英

Laravel4 : The requested resource /admin was not found on this server

there is a very weird problem I face with simple Laravel routing.

Because some screenshots, say sometimes more than 1000 words. Here is what I am encountering.

我无法路由到“管理员”

如果我选择不同的名称,它工作得很好

如果路线真的不存在,我会得到一个真正的例外。

It doesn't matter, if the route is set in laravel or not. It just won't accept the name "admin" and only "admin". Every other name is routed correctly.

Can't explain this. And wouldn't want to make a fresh laravel installation.

I don't use appache, because "php artisan serve" does the job for me.

Any clues?

It may that under public you have a folder named admin. That can be source of your problems.

In folder public->admin place these files named

.htaccess  
favicon.ico  
index.php  
robots.txt 
web.config

like

在此处输入图片说明

and change your index.php file in admin folder
from this to
在此处输入图片说明

into this
在此处输入图片说明

hopefully it will solve your problem.
It worked for me.

您可以通过将 Laravel 的项目目录复制到 ubuntu 的var/www/html和 Windows 的htdocs中来解决它

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