-
1. Re: Redirect root context in Wildfly 8.1.0
scrublet Jul 17, 2014 7:25 PM (in response to x046866x)1. Create a new directory in your JBoss directory. Your original was named "welcome-content", so let's name the new one "root-app-redirect".
2. Create a new index.html file that looks like this:
3. Create a new handler in your undertow system such that you see this:
<handlers> <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/> <file name="new-welcome-content" path="${jboss.home.dir}/root-app-redirect"/> </handlers>
4. Point the root location to the new file handler:
<location name="/" handler="new-welcome-content"/>
The root "/" should now go to your new directory's index.html, which immediately redirects to the content URL.
Edit: the HTML highlighting doesn't seem to be working. Here's what I tried to insert for index.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="refresh" content="N;url=https://server.com/myapplication/myapp.html"> <!-- the https should make sure you always get redirected -->
</head>
</html>
-
2. Re: Redirect root context in Wildfly 8.1.0
x046866x Jul 18, 2014 6:32 AM (in response to scrublet)1 of 1 people found this helpfulYou know, now that I see this answer it makes complete sense. I probably should have thought of that. I was just going to modify the welcome-content/index.html but didn't like the fact that I had to modify something "out of the box" that way.
I'm going to try to make the change via CLI as well (which I should be able to do).
Thank you!!!