[Hippo-cms7-user BETA] Redirect after login to cms

Camiel Dobbelaar cd at sentia.nl
Wed Nov 5 11:16:22 CET 2008


Hi Bart,

we are already using mod_proxy like this:

RewriteEngine On
RewriteRule ^/(.*) http://127.0.0.1:8080/XXX-ecm-1.01.00-SNAPSHOT/$1 [L,P]
ProxyPassReverse / http://127.0.0.1:8080/

This works fine for the sites, but the CMS insists on using the appname
in the redirect:

POST resulting from the login:
http://cms.XXX.sentia.nl/;jsessionid=8C926AD3AFA136544B05C092DEA52CF3?wicket:interface=:0:root:signInForm::IFormSubmitListener::

Answer:
HTTP/1.x 302 Moved Temporarily
Date: Wed, 05 Nov 2008 10:07:28 GMT
Server: Apache-Coyote/1.1
Location:
http://cms.XXX.sentia.nl/XXX-ecm-1.01.00-SNAPSHOT/;jsessionid=8C926AD3AFA136544B05C092DEA52CF3?wicket:interface=:1::::

So browser does:
GET
/XXX-ecm-1.01.00-SNAPSHOT/;jsessionid=8C926AD3AFA136544B05C092DEA52CF3?wicket:interface=:1::::
HTTP/1.1


And because of the mod_proxy above this ultimately results in the
appname being prepended twice:
HTTP/1.x 404 /XXX-ecm-1.01.00-SNAPSHOT/XXX-ecm-1.01.00-SNAPSHOT/


Just had a hunch and it looks like an extra ProxyPassReverse does the
trick (we have to test it more thoroughly though):

    RewriteEngine On
    RewriteRule ^/(.*) http://127.0.0.1:8080/XXX-ecm-1.01.00-SNAPSHOT/$1
[L,P]
    ProxyPassReverse / http://127.0.0.1:8080/XXX-ecm-1.01.00-SNAPSHOT/
    ProxyPassReverse / http://127.0.0.1:8080/


Does that look like the right solution to you?


Bart van der Schans wrote:
> Hi Bjorn,
> 
> I'm not really sure what you mean, but if you want to remove the context
> path (appname) from your url you basically have two options:
> 
> - deploy the cms in the context root (eg as ROOT.war)
> - use mod_proxy in front of the cms and proxy /appname to /
> 
> If you want to go for the latter option I can provide an example config
> if needed.
> 
> Regards,
> Bart
> 
> 
> 
> On 4-11-2008 13:54, Björn Lindström wrote:
>> Hi all,
>>
>> Is it possible to specify the redirect after a successful login to the
>> cms?
>>
>> For example if we use address http://cms.blabla.com to access the cms,
>> after the login it redirects to
>> http://cms.blabla.com/appname/;jsessionid=354E709305F9A6D4C2CE2D47B9A5A462?wicket:interface=:2
>>
>> which is not what we want.
>>
>> Regards
>>
>> Bjorn
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Hippo-cms7-user mailing list
>> Hippo-cms7-user at lists.hippo.nl
>> http://lists.hippo.nl/mailman/listinfo/hippo-cms7-user
> 
> 




More information about the Hippo-cms7-user mailing list