https://github.com/laravelir/redirector
a redirector pacakge
https://github.com/laravelir/redirector
laravel laravel-package laravel-redirect redirect-urls redirector
Last synced: 4 months ago
JSON representation
a redirector pacakge
- Host: GitHub
- URL: https://github.com/laravelir/redirector
- Owner: laravelir
- Created: 2022-02-04T03:30:38.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-09T00:43:13.000Z (about 3 years ago)
- Last Synced: 2025-01-28T15:07:51.619Z (5 months ago)
- Topics: laravel, laravel-package, laravel-redirect, redirect-urls, redirector
- Language: PHP
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
[](https://github.com/laravelir/redirector/forks) [](https://github.com/laravelir/redirector/stargazers) [](https://packagist.org/packages/laravelir/redirector)
# laravel Package
A redirector package
Seo Toolkit for laravel projects
### Installation
1. Run the command below to add this package:
```
composer require laravelir/redirector
```2. Open your config/app.php and add the following to the providers/aliases array:
```php
Laravelir\Redirector\Providers\RedirectorServiceProvider::class, # provider
``````php
'Redirector' => Laravelir\Redirector\Facades\Redirector::class # aliases
```3. Run the command below to install package:
```
php artisan redirector:install
```### Features
for redirector service add this middleware
```
'redirector => \Laravelir\Redirector\Http\Middleware\RedirectorMiddleware::class,
```for enforce https this middleware
```php
'enforce_https' => \Laravelir\Redirector\Http\Middleware\RedirectorEnforceHttps::class,
```
add this to env:
```php
REDIRECTOR_ENFORCE_HTTPS=true
```### Redirector Service
```php
use Laravelir\Redirector\Services;$redirector = resolve(Redirector::class);
$redirector->store($source_url, $destination_url, $response_code);
$redirector->shouldRedirect(Request $request);
$redirector->redirect(Request $request);```
#### Goals of this package (Todo)
1 -
2 - redirect 404 pages to exist pageenable/disable www to non-www
add slashed to end of all routes or remove it
force redirect http to https in htaccess and nginx
add route hit counter
implements features of wordpress plugins like redirect-301, SEO Redirection Premium, safe-redirect-manager, Yoast seo Pro, Rank Math
add redis - file - Mysql - Mongodb engine Repository
add redirect ro lower
abort index.php page to 404
add exclude urls for redirects
add wildcard params (Regular Expression Constraints)
add url shortener
## Testing
```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [:author_name](https://github.com/:author_username)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.