Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] My redirects are looping.

Hi Andrew,

Can you describe exactly what you're trying to achieve, ie what's the
problem you're trying to solve? Getting that sorted will help
determine which tools you use to do it.

Jan

On 24 September 2014 10:03, Andrew Penhorwood <penhorwood@xxxxxxxxx> wrote:
> I have this context
>
> <?xml version="1.0"  encoding="ISO-8859-1"?>
> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN"
> "http://www.eclipse.org/jetty/configure_9_0.dtd";>
>
> <Configure class="org.eclipse.jetty.webapp.WebAppContext">
>     <Set name="contextPath">/</Set>
>     <Set name="resourceBase">/sites/wordmissions/www</Set>
>
>     <Set name="defaultsDescriptor"><SystemProperty name="jetty.home"
> default="."/>/etc/webdefault.xml</Set>
>
>     <Set name="virtualHosts">
>         <Array type="String">
>             <Item>www.wordmissions.org</Item>
>         </Array>
>     </Set>
> </Configure>
>
>
> I setup this MovedContextHandler but the *.wordmissions.org cause the
> browser to go into a redirect loop and crash.
>
>
> <?xml version="1.0"  encoding="ISO-8859-1"?>
> <!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://www.wordmissions.org</Set>
>     <Set name="permanent">true</Set>
>     <Set name="discardPathInfo">false</Set>
>     <Set name="discardQuery">false</Set>
>
>     <Set name="virtualHosts">
>         <Array type="String">
>             <Item>wordmissions.org</Item>
>             <Item>wordmissions.com</Item>
>             <Item>*.wordmissions.org</Item>
>             <Item>*.wordmissions.com</Item>
>         </Array>
>     </Set>
> </Configure>
>
>
> If I don't use the *.wordmissions.org then any sub domain like
> bob.wordmissions.org does not redirect to the correct location.  It goes to
> the default context which seems to be the first one defined.
>
>
> --
> Andrew Penhorwood
> andrew@xxxxxxxxxxxx
> www.coldbits.com
>
> _______________________________________________
> 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



-- 
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
'Expert Jetty/CometD developer,production,operations advice'


Back to the top