sperelson/laravel-single-redirect
最新稳定版本:0.4
Composer 安装命令:
composer require sperelson/laravel-single-redirect
包简介
Adds ability to reduce multiple redirects down to one
README 文档
README
Laravel Middleware Package
Please do not use this on production - it doesn't even have tests!
Purpose: Add a middleware to your Laravel project that will reduce redirect hops down to 1 redirect.
Sometimes, through no fault of your own, you can end up with redirects after redirects before your website's visitors finally end up on their destination page.
Why: SEO folk keep saying that a single redirect hop is better. This makes any SEO practitioner giddy and you didn't have to do anything difficult to combine all the possible redirect hops into a single one.
How: It works by placing itself (tries to anyway) as the last middleware and intercepts redirects. Upon intercepting a redirect, it creates an internal request to check if the next response is also a redirect. Only works with GET requests!
Installation
composer require sperelson/laravel-single-redirect
Extra information
The package adds a header called single-redirect on each internal request. And inserts the
single-redirect header into the final redirect response with the count of redirects. If 1 then it
did not do anything for you. If the count is higher than 1 then it turned the response into a single
redirect for the user.
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-24