{"id":17569019,"url":"https://github.com/paultuckey/urlrewritefilter","last_synced_at":"2025-05-14T19:10:21.956Z","repository":{"id":34635141,"uuid":"38586425","full_name":"paultuckey/urlrewritefilter","owner":"paultuckey","description":"A Java Web Filter with functionality like Apache's mod_rewrite","archived":false,"fork":false,"pushed_at":"2024-02-22T20:54:01.000Z","size":5247,"stargazers_count":333,"open_issues_count":25,"forks_count":145,"subscribers_count":29,"default_branch":"main","last_synced_at":"2025-04-13T13:59:32.636Z","etag":null,"topics":["java-web-filter","mod-rewrite","rewrite-urls"],"latest_commit_sha":null,"homepage":"http://tuckey.org/urlrewrite/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paultuckey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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},"funding":{"github":"paultuckey","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-07-05T22:25:22.000Z","updated_at":"2025-01-19T21:51:10.000Z","dependencies_parsed_at":"2022-07-12T16:11:29.407Z","dependency_job_id":"ee400c05-2cc3-4e62-a832-7b8d9de0d2e8","html_url":"https://github.com/paultuckey/urlrewritefilter","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paultuckey%2Furlrewritefilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paultuckey%2Furlrewritefilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paultuckey%2Furlrewritefilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paultuckey%2Furlrewritefilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paultuckey","download_url":"https://codeload.github.com/paultuckey/urlrewritefilter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254209859,"owners_count":22032897,"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":["java-web-filter","mod-rewrite","rewrite-urls"],"created_at":"2024-10-21T17:08:42.394Z","updated_at":"2025-05-14T19:10:20.485Z","avatar_url":"https://github.com/paultuckey.png","language":"Java","readme":"\n# UrlRewriteFilter\n\n### [UrlRewriteFilter Web Site](http://www.tuckey.org/urlrewrite/) | [Documentation](https://tuckey.org/urlrewrite/manual/4.0/index.html)\n\n\n*Based on the popular and very useful [mod_rewrite](http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html) for apache, UrlRewriteFilter is a Java Web Filter for any J2EE compliant web application server (such as [Resin](http://caucho.com), [Jetty](https://eclipse.dev/jetty/) or [Tomcat](http://tomcat.apache.org/)), which allows you to rewrite URLs before they get to your code. It is a very powerful tool just like Apache's mod_rewrite.*\n\nURL rewriting is very common with Apache Web Server (see [mod_rewrite's rewriting guide](http://httpd.apache.org/docs-2.0/misc/rewriteguide.html)) but has not been possible in most java web application servers. The main things it is used for are:\n\n  * URL Tidyness / [URL Abstraction](https://tuckey.org/urlrewrite/manual/4.0/guide.html#urlabs) - keep URLs tidy irrespective of the underlying technology or framework (JSP, Servlet, Struts etc).\n  * Browser Detection - Allows you to rewrite URLs based on request HTTP headers (such as user-agent or charset).\n  * Date based rewriting - Allows you to forward or redirect to other URL's based on the date/time (good for planned outages).\n  * Moved content - enable a graceful move of content or even a change in CMS.\n  * Tiny/Friendly URL's (i.e. blah.com/latest can be redirected to blah.com/download/ver1.2.46.2/setup.exe)\n  * A Servlet mapping engine (see [Method Invocation](https://tuckey.org/urlrewrite/manual/4.0/guide.html#method))\n\n\n!UrlRewriteFilter uses an xml file, called urlrewrite.xml (it goes into the WEB-INF directory), for configuration.  Most parameters can be Perl5 style Regular Expressions or Wildcard Expressions. This makes it very powerful indeed.\n\nSee the [manual](https://tuckey.org/urlrewrite/manual/4.0/index.html) for more information.\n\n\n## Quick Start\n\n  * Add Maven dependency below or add \u003ca href=\"http://central.maven.org/maven2/org/tuckey/urlrewritefilter/5.1.3/urlrewritefilter-5.1.3.jar\"\u003eurlrewritefilter-5.1.3.jar\u003c/a\u003e directly into your \u003cb\u003eWEB-INF/lib\u003c/b\u003e directory.\n```xml\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.tuckey\u003c/groupId\u003e\n        \u003cartifactId\u003eurlrewritefilter\u003c/artifactId\u003e\n        \u003cversion\u003e5.1.3\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n\nFor Servlet API 4 or less (javax), use the old version 4.x\n```xml\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.tuckey\u003c/groupId\u003e\n        \u003cartifactId\u003eurlrewritefilter\u003c/artifactId\u003e\n        \u003cversion\u003e4.0.3\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n  * Add the following to your WEB-INF/web.xml (add it near the top above your servlet mappings (if you have any)): (see \u003ca href=\"https://tuckey.org/urlrewrite/manual/4.0/index.html#filterparams\"\u003efilter parameters\u003c/a\u003e for more options)\n```xml\n    \u003cfilter\u003e\n        \u003cfilter-name\u003eUrlRewriteFilter\u003c/filter-name\u003e\n        \u003cfilter-class\u003eorg.tuckey.web.filters.urlrewrite.UrlRewriteFilter\u003c/filter-class\u003e\n    \u003c/filter\u003e\n    \u003cfilter-mapping\u003e\n        \u003cfilter-name\u003eUrlRewriteFilter\u003c/filter-name\u003e\n        \u003curl-pattern\u003e/*\u003c/url-pattern\u003e\n        \u003cdispatcher\u003eREQUEST\u003c/dispatcher\u003e\n        \u003cdispatcher\u003eFORWARD\u003c/dispatcher\u003e\n    \u003c/filter-mapping\u003e\n```\n  * Add \u003cb\u003e\u003ca href=\"https://tuckey.org/urlrewrite/manual/4.0/urlrewrite.xml\"\u003eurlrewrite.xml\u003c/a\u003e\u003c/b\u003e into your WEB-INF directory. (src/main/webapp/WEB-INF/ for Maven users)\n  * Restart the context.\n\nYou can visit http://127.0.0.1:8080/rewrite-status (or whatever the address of your local webapp and context) to see output (note: this page is only viewable from localhost).\n\nPreviously on Google Code: http://code.google.com/p/urlrewritefilter.\n","funding_links":["https://github.com/sponsors/paultuckey"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaultuckey%2Furlrewritefilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaultuckey%2Furlrewritefilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaultuckey%2Furlrewritefilter/lists"}