{"id":15272419,"url":"https://github.com/lil5/gin-url-rewrite","last_synced_at":"2026-02-16T02:42:09.045Z","repository":{"id":59404497,"uuid":"431864411","full_name":"lil5/gin-url-rewrite","owner":"lil5","description":"URL Rewrite middleware for gin","archived":false,"fork":false,"pushed_at":"2021-11-25T14:11:04.000Z","size":1,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T19:38:04.154Z","etag":null,"topics":["gin","gin-gonic","go","golang","middleware","rewrite","url"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lil5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-25T13:57:27.000Z","updated_at":"2023-06-27T09:04:29.000Z","dependencies_parsed_at":"2022-09-16T10:21:30.944Z","dependency_job_id":null,"html_url":"https://github.com/lil5/gin-url-rewrite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lil5%2Fgin-url-rewrite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lil5%2Fgin-url-rewrite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lil5%2Fgin-url-rewrite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lil5%2Fgin-url-rewrite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lil5","download_url":"https://codeload.github.com/lil5/gin-url-rewrite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244990069,"owners_count":20543614,"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":["gin","gin-gonic","go","golang","middleware","rewrite","url"],"created_at":"2024-09-30T09:06:43.279Z","updated_at":"2025-10-11T11:38:34.864Z","avatar_url":"https://github.com/lil5.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Url Rewrite middleware for gin\n\n## Example\n\nIn this exable these urls use the same route\n\n- `http://localhost:1234/test-me`\n- `http://localhost:1234/index.php/test-me`\n\nAnd\n\n- `http://localhost:1234/v1/test-me`\n- `http://localhost:1234/v1.php/test-me`\n\n\n```go\npackage main\n\nfunc main() {\n\tr := gin.Default()\n\tr.Use(\n      middleware.UrlRewrite(r, \"/index.php\", \"\"),\n      middleware.UrlRewrite(r, \"/v1.php\", \"/v1\"),\n   )\n\n\tr.GET(\"/test-me\", func(c *gin.Context) {\n\t\tc.Status(http.StatusTeapot)\n\t})\n\n   r.GET(\"/v1/test-me\", func(c *gin.Context) {\n\t\tc.Status(http.StatusOK)\n\t})\n\tr.Run(\":1234\")\n}\n```\n\n## Install\n\ncopy the contents of [gin-url-rewrite.go](/gin-url-rewrite.go) in to your project.\n\n## License\n\nWTFPL – Do What the Fuck You Want to Public License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flil5%2Fgin-url-rewrite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flil5%2Fgin-url-rewrite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flil5%2Fgin-url-rewrite/lists"}