ssx / threeohone
一个简单的Laravel包,用于处理301重定向。
1.0.0
2016-01-04 13:49 UTC
Requires (Dev)
- phpunit/phpunit: 4.4.*
This package is not auto-updated.
Last update: 2024-09-11 18:54:03 UTC
README
一个简单的Laravel包,用于处理301重定向。
安装
- Add to `"ssx/threeohone": "0.0.1",` to composer.json
- Add Service Provider `SSX\ThreeOhOne\Providers\ThreeOhOneServiceProvider::class` to config/app.php
- Add Global Middleware `\SSX\ThreeOhOne\Middleware\CheckForRedirect::class` to Http/Kernel.php
- Run vendor:publish
- php artisan migrate
- Add records to redirect table
#### 用法 两种重定向类型,'domain' 和 'path'。域重定向将重定向
www.site.com/path/to/file.html to http://test.com
路径重定向将忽略域,仅使用请求的路径,例如
/path/to/file.html to http://example.com
这在具有子域的网站上非常有用。
待办事项
- 添加缓存
- 添加测试