Skip to main content

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

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

My goal is to make the url start with http://surelogic.com regardless of the way the user got to the host (e.g., http://www.surelogic.com and so on).

Best,
Tim

Back to the top