天宝寺||陈瑞轩

Menu

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;
}
— 于 共写了512个字
— 文内使用到的标签:

发表评论

电子邮件地址不会被公开。 必填项已用*标注