Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dokku/dokku-redirect
A plugin for dokku that gives the ability to set simple redirects for an application
https://github.com/dokku/dokku-redirect
dokku dokku-plugin nginx paas redirect
Last synced: 5 days ago
JSON representation
A plugin for dokku that gives the ability to set simple redirects for an application
- Host: GitHub
- URL: https://github.com/dokku/dokku-redirect
- Owner: dokku
- License: mit
- Created: 2015-10-18T23:06:51.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-08-20T15:31:28.000Z (about 1 year ago)
- Last Synced: 2024-10-30T00:56:04.508Z (10 days ago)
- Topics: dokku, dokku-plugin, nginx, paas, redirect
- Language: Shell
- Homepage:
- Size: 44.9 KB
- Stars: 107
- Watchers: 6
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - dokku/dokku-redirect - A plugin for dokku that gives the ability to set simple redirects for an application (others)
README
# dokku-redirect
dokku-redirect is a plugin for [dokku][dokku] that gives the ability to set simple redirects for an application.
This plugin only redirects one domain to another and does not handle complete URLs. If source domain is managed by dokku and is TLS enabled, then nginx configuration for https redirects will be handled automatically.
## Installation
```sh
# dokku 0.11+
$ dokku plugin:install https://github.com/dokku/dokku-redirect.git
```## Commands
```
$ dokku help
redirect Display the redirects set on app
redirect:set [] Set a redirect from domain to domain
redirect:unset Unset a redirect from
```## Redirect Codes
| Code | Name | Behavior |
| ---- | ------------------ | -------------------------------------------------- |
| 301 | Moved Permanently | __(Default)__ Permanent, preserves method |
| 302 | Found | Temporary, may change method to GET |
| 303 | See Other | (HTTP/1.1) Temporary, changes method to GET |
| 307 | Temporary Redirect | (HTTP/1.1) Temporary, preserves method |## Usage
Check redirects on my-app
```shell
$ dokku redirect my-appSOURCE DESTINATION CODE
ma.dokku.me my-app.dokku.me 301
```Set a new redirect on my-app
```shell
$ dokku redirect:set my-app ma.dokku.me my-app.dokku.me-----> Setting redirect for my-app...
done
```Redirects will include all app-specific nginx include files.
Unset an existing redirect
```shell
$ dokku redirect:unset my-app ma.dokku.me-----> Unsetting redirect for my-app...
done
```## License
This plugin is released under the MIT license. See the file [LICENSE](LICENSE).
[dokku]: https://github.com/progrium/dokku