Skip to main content

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

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

Back to the top