bavix/laravel-middleware-ifindex

此包已被废弃,不再维护。未建议替代包。

Laravel 5 的 IfIndex 中间件

1.1.0 2020-08-31 10:13 UTC

This package is auto-updated.

Last update: 2023-01-29 02:51:20 UTC


README

此包解决SEO问题。

http://example/index.php -> 301, http://example/
http://example/index.php/en -> 301, http://example/en
http://example/index.php/en?query -> 301, http://example/en?query

首先,在您的composer文件中引入此包

composer require bavix/laravel-middleware-ifindex

更新后,将 ServiceProvider 添加到 config/app.php 中 providers 数组。如果您使用的是 5.5 以上的 Laravel,则跳过此步骤。

Bavix\Providers\IfIndexProvider::class,

支持者

Supported by JetBrains