当前位置: 首页 > PHP, 工作 > 正文

laravel/lumen 404解决方法

Apache

The framework ships with a public/.htaccess file that is used to allow URLs without index.php. If you use Apache to serve your Laravel application, be sure to enable the mod_rewrite module.

If the .htaccess file that ships with Laravel does not work with your Apache installation, try this one:

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Nginx

On Nginx, the following directive in your site configuration will allow “pretty” URLs:

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

本文固定链接: http://www.chenruixuan.com/archives/1132.html | 天宝寺||陈瑞轩

该日志由 陈瑞轩 于2016年05月04日发表在 PHP, 工作 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: laravel/lumen 404解决方法 | 天宝寺||陈瑞轩

laravel/lumen 404解决方法:等您坐沙发呢!

发表评论

快捷键:Ctrl+Enter