I have an embedded Jetty Server and I want to direct request from http://localhost:8080/ to https://localhost:4433/ how do I do that? I tried this:
// Set up rewriting (HTTP -> HTTPS)
RewriteHandler rewrite = new RewriteHandler();
RedirectPatternRule redirect = new RedirectPatternRule();
redirect.setPattern("http://localhost:8080/*");
redirect.setLocation("https://localhost:4433/");
rewrite.addRule(redirect);
And added it within my handler, but it doesn't work. I know rules like
RewriteHandler rewrite = new RewriteHandler();
RedirectPatternRule redirect = new RedirectPatternRule();
redirect.setPattern("/redirect/*");
redirect.setLocation("/redirected");
rewrite.addRule(redirect);
work 100%, but is there a way to match the full URL?