Re: Redirect request.contextPath for HTTPS protocol

Splash Forums PrettyFaces Users Redirect request.contextPath for HTTPS protocol Re: Redirect request.contextPath for HTTPS protocol

#20665

Hey Event,

I’m sorry, I had another look at the PrettyFaces code and just saw that my suggested solution won’t work as I initially thought. Its because rewrite processors are also based on working with URLs relative to the webapps context path.

I think currently you have only one option:

<rewrite match="^/store$" url="https://website/store" redirect="301" />

Unfortunately this will work only for exactly one URL. So you will have to add multiple rules if you want multiple URLs to be automatically redirected to the https version.

I know that this is not a very nice solution. But it will work.

If you have any idea how to integrated something like this better into PrettyFaces, let us know. We are always open for any kind of suggestion.

Perhaps something like this?

<rewrite match="^/store.*$" redirect="301" sslRequired="true" />