@@ -0,0 +1,1362 @@
+package com.stubbornjava.examples.undertow.redirects;%0A%0Aimport com.stubbornjava.common.undertow.Exchange;%0Aimport com.stubbornjava.common.undertow.SimpleServer;%0A%0Aimport io.undertow.server.HttpHandler;%0Aimport io.undertow.server.HttpServerExchange;%0Aimport io.undertow.server.RoutingHandler;%0A%0Apublic class RedirectServer %7B%0A%0A    // %7B%7Bstart:redirects%7D%7D%0A    public static void hello(HttpServerExchange exchange) %7B%0A        Exchange.body().sendText(exchange, %22Hello%22);%0A    %7D%0A%0A    public static void temporaryRedirect(HttpServerExchange exchange) %7B%0A        Exchange.redirect().temporary(exchange, %22/hello%22);%0A    %7D%0A%0A    public static void permanentRedirect(HttpServerExchange exchange) %7B%0A        Exchange.redirect().permanent(exchange, %22/hello%22);%0A    %7D%0A%0A    public static void referrerRedirect(HttpServerExchange exchange) %7B%0A        Exchange.redirect().referer(exchange);%0A    %7D%0A%0A    private static final HttpHandler ROUTES = new RoutingHandler()%0A        .get(%22/hello%22, RedirectServer::hello)%0A        .get(%22/temporaryRedirect%22, RedirectServer::temporaryRedirect)%0A        .get(%22/permanentRedirect%22, RedirectServer::permanentRedirect)%0A        .get(%22/referrerRedirect%22, RedirectServer::referrerRedirect)%0A    ;%0A%0A    public static void main(String%5B%5D args) %7B%0A        SimpleServer server = SimpleServer.simpleServer(ROUTES);%0A        server.start();%0A    %7D%0A    // %7B%7Bend:redirects%7D%7D%0A%7D%0A

Add redirects example