Redirecting old domains to https://try.freemarker.apache.org (also updated the URL in the README.md)
diff --git a/README.md b/README.md
index 1e8c967..8bac5d1 100644
--- a/README.md
+++ b/README.md
@@ -19,11 +19,11 @@
It's a web page to quickly try template snippets, with some simple data-model. It's especially handy for learning the
template language.
-For a deployed version of this tool you can visit <http://freemarker-online.kenshoo.com/> (or soon
-<http://try.freemarker.org/>)
+For a deployed version of this tool you can visit <https://try.freemarker.apache.org/>.
Development Instructions
------------------------
+
* Clone the repository to a local directory
* Run `./gradlew build` from the cloned directory (use JDK 8)
* If you want to run it using IDEA run `./gradlew cleanidea idea`; this will generate the IDEA project for you.
diff --git a/src/main/java/org/apache/freemarker/onlinetester/dropwizard/FreeMarkerOnlineTester.java b/src/main/java/org/apache/freemarker/onlinetester/dropwizard/FreeMarkerOnlineTester.java
index 6327348..02ca90a 100644
--- a/src/main/java/org/apache/freemarker/onlinetester/dropwizard/FreeMarkerOnlineTester.java
+++ b/src/main/java/org/apache/freemarker/onlinetester/dropwizard/FreeMarkerOnlineTester.java
@@ -72,8 +72,11 @@
)));
bootstrap.addBundle(new RedirectBundle(
new UriRedirect(
- "http://freemarker-online.kenshoo.com([:/].*)$",
- "http://try.freemarker.org$1"),
+ "http://freemarker-online.kenshoo.com(?::\\d+)?(/.*)$",
+ "https://try.freemarker.apache.org$1"),
+ new UriRedirect(
+ "http://try.freemarker.org(?::\\d+)?(/.*)$",
+ "https://try.freemarker.apache.org$1"),
new UriRedirect(
"http://try.freemarker.apache.org((:\\d+)?/(?!\\.well-known/acme-challenge/).*)$",
"https://try.freemarker.apache.org$1")