Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] use of MovedContextHandler to remove "www."

On Fri, Apr 17, 2015 at 8:32 AM, Simone Bordet <sbordet@xxxxxxxxxxx> wrote:
Hi,

On Wed, Apr 15, 2015 at 9:50 PM, Tim Halloran <hallorant@xxxxxxxxx> wrote:
> I'm trying to make all connections use surelogic.com at my site using:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN"
> "http://www.eclipse.org/jetty/configure_9_0.dtd">
>
> <Configure class="org.eclipse.jetty.server.handler.MovedContextHandler">
>   <Set name="contextPath">/</Set>
>   <Set name="newContextURL">http://surelogic.com</Set>
>   <Set name="permanent">true</Set>
>   <Set name="discardPathInfo">false</Set>
>   <Set name="discardQuery">false</Set>
> </Configure>
>
>
> But even though this class is in jetty-server-9.2.10.v20150310.jar I don't
> know where to put this xml file in jetty.base so it gets used?  If I just
> add it to my command line my site fails it loads up then doesn't work

You must add it to $jetty.base/webapps (provided you have enabled the
"deploy" module).

Thanks, I figured that out playing around (really I don't know why it didn't occur to me) -- it actually doesn't work.  I really want to change the host name used from www.surelogic.com to surelogic.com but that doesn't work.

I don't think there is a way to do this with Jetty, change all traffic from 


to 


at least that I can find in the docs.  (of course the two addresses are the same host)


--
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top