Alex
Alex

Reputation: 616

Redirect to and from http and https using java server behind amazon elb

I have an Amazon ELB for my domain www.example.com. At the moment there is one instance behind the ELB running a web app on JBoss 6.0. I want to be able to redirect the user from and to http and https depending on the path. There are three paths only that require https and the other paths should only be accessed through http. I am able to do the redirect to https for the three paths (using web.xml) but not the redirection back to http for the other paths.

I am not using the apache server in front of JBoss so I want to achieve everything through plain Java and JBoss. I want to either use the web.xml or the urlrewritefilter but preferably not both.

Any advice would be greatly appreciated.

Regards

Upvotes: 2

Views: 1252

Answers (1)

Peter
Peter

Reputation: 965

You can use the JBoss official rewrite module which lets you use Apache style rewrite syntax in a rewrite.properties file.

Upvotes: 3

Related Questions