{"id":15406768,"url":"https://github.com/dannyben/redirectly","last_synced_at":"2025-04-17T22:57:22.224Z","repository":{"id":43366086,"uuid":"383122183","full_name":"DannyBen/redirectly","owner":"DannyBen","description":"Redirect server with dynamic URL and hostname support","archived":false,"fork":false,"pushed_at":"2024-12-14T05:24:05.000Z","size":79,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T01:18:01.700Z","etag":null,"topics":["docker","redirects","ruby","ruby-gem","webserver"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DannyBen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-05T11:47:17.000Z","updated_at":"2024-12-14T05:24:06.000Z","dependencies_parsed_at":"2024-01-27T17:31:34.417Z","dependency_job_id":"fc7e033e-60c2-45df-b9c4-b130b4552081","html_url":"https://github.com/DannyBen/redirectly","commit_stats":{"total_commits":46,"total_committers":1,"mean_commits":46.0,"dds":0.0,"last_synced_commit":"eecb06d56b3d84e70cc15ee7cdd05b3ccd8d4867"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fredirectly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fredirectly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fredirectly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fredirectly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DannyBen","download_url":"https://codeload.github.com/DannyBen/redirectly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249389163,"owners_count":21262864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","redirects","ruby","ruby-gem","webserver"],"created_at":"2024-10-01T16:25:18.287Z","updated_at":"2025-04-17T22:57:22.208Z","avatar_url":"https://github.com/DannyBen.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redirectly - Redirect server with dynamic URL and hostname support\n\n[![Gem Version](https://badge.fury.io/rb/redirectly.svg)](https://badge.fury.io/rb/redirectly)\n[![Build Status](https://github.com/DannyBen/redirectly/workflows/Test/badge.svg)](https://github.com/DannyBen/redirectly/actions?query=workflow%3ATest)\n[![Maintainability](https://api.codeclimate.com/v1/badges/094281e5b8e90b8ff85f/maintainability)](https://codeclimate.com/github/DannyBen/redirectly/maintainability)\n\n---\n\nRedirectly is a simple URL redirect server that uses a simple INI file for \ndefining dynamic redirects.\n\n---\n\n## Install\n\n```\n$ gem install redirectly\n```\n\n## Docker Image\n\nRedirectly is also available as a [docker image][docker]:\n\n```shell\n# Pull the image\n$ docker pull dannyben/redirectly\n\n# Run the redirectly command line\n$ docker run --rm -it dannyben/redirectly --help\n\n# Start the server with your local configuration file\n$ docker run --rm -it \\\n    -p 3000:3000 \\\n    -v $PWD/redirects.ini:/app/redirects.ini \\\n    dannyben/redirectly \n```\n\n### Using with docker-compose\n\n```yaml\n# docker-compose.yml\nservices:\n  redirectly:\n    image: dannyben/redirectly\n    ports:\n      - 3000:3000\n    volumes:\n      - ./redirects.ini:/app/redirects.ini\n```\n\n### Using as an alias\n\n```shell\n$ alias redirectly='docker run --rm -it -p 3000:3000 -v $PWD/redirects.ini:/app/redirects.ini dannyben/redirectly'\n```\n\n## Quick Start\n\n```shell\n# In an empty directory, create a sample configuration file\n$ redirectly --init\n\n# Start the server\n$ redirectly\n\n# In another terminal, access the server using one of the configured rules\n$ curl -v something.localhost:3000\n```\n\nYou should receive a redirect header:\n\n```shell\n# ...\n\u003c HTTP/1.1 302 Found\n\u003c Location: http://it-works.com/something\n# ...\n```\n\n\n## Usage \n\nRedirectly requires a simple INI file with redirect configuration details.\n\nYou can create a sample configuration file by running:\n\n```shell\n$ redirectly --init\n```\n\nThis will create a sample `redirects.ini` file:\n\n```ini\nexample.com = https://other-site.com/\n*.mygoogle.com/:anything = https://google.com/?q=%{anything}\nexample.org/* = https://other-site.com/\n*.old-site.com = !https://permanent.redirect.com\n:sub.app.localhost/* = http://it-works.com/%{sub}\nproxy.localhost/*rest = @https://proxy.target.com/base/*rest\ninternal.localhost/reload = :reload\n(*)old-domain.com/*rest = http://new-domain.com/%{rest}\n```\n\nFor additional server options, see:\n\n```shell\n$ redirectly --help\n```\n\nThe configuration file is built of `pattern = target` pairs, where:\n\n- `pattern` - is any URL pattern that is supported by [Mustermann][mustermann].\n- `target` - is the target URL to redirect to.\n\n### Special INI Notation\n\n#### Redirect type\n\nIf the target starts with `!`, a permanent redirect (301) will be performed.  \nIf it does not, a temporary redirect (302) will be performed by default:\n\n```ini\ntest.localhost/temporary = http://example.com\ntest.localhost/permanent = !http://example.com\n```\n\n#### Proxying\n\nIf the target starts with `@`, the content will be proxied instead of being\nredirected:\n\n```ini\ntest.localhost = @http://example.com\n```\n\n#### Named arguments\n\nPatterns that include strings starting with a colon `:` will expose those\nstrings as Ruby substitution variables in the target:\n\n```ini\ntest.localhost/:anything = http://example.com/path/%{anything}\n```\n\n#### Splats\n\nYou can use a splat `*` or a named splat `*name` in the pattern.  \nNamed splats will also be exposed as Ruby substitution variables in the target:\n\n```ini\n(*)test.localhost/*rest = http://example.com/%{rest}\n```\n\n## Contributing / Support\n\nIf you experience any issue, have a question or a suggestion, or if you wish\nto contribute, feel free to [open an issue][issues].\n\n\n---\n\n[issues]: https://github.com/DannyBen/redirectly/issues\n[mustermann]: https://github.com/sinatra/mustermann/blob/master/mustermann/README.md\n[docker]: https://hub.docker.com/r/dannyben/redirectly","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyben%2Fredirectly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannyben%2Fredirectly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyben%2Fredirectly/lists"}