Foren

Controlling redirects

Wayne Babich, geändert vor 7 Jahren.

Controlling redirects

Junior Member Beiträge: 29 Beitrittsdatum: 17.01.06 Neueste Beiträge
I feel like this must be an easy thing to do, but can't find the solution.

The url for reaching our Liferay server is http://myserver
Liferay redirects to multiple locations, including http://myserver/c/... and http://myserver/user/...

I need to change the url to be http://myserver/something
and the redirects need to go to http://myserver/something/c/... and http://myserver/something/user/...

I believe that it's easy to control the initial url for contacting the server, using Tomcat configuration capabilities. But I haven't figured out how to control the redirects.

I have tried setting portal.ctx in portal-ext.properties, moving the webapps/ROOT directory to "webapps/something", and renaming ROOT.xml to "something.xml". These steps are widely advertised on various web sites.
But I'm still getting redirects to http://myserver/c/portal (instead of http://myserver/something/c/portal)

Is there a way to do this?
BTW: I'm using Liferay 5. (Yeah, I know) I'd like to control this with configuration/property/xml files.

Thank you
thumbnail
Samuel Kong, geändert vor 7 Jahren.

RE: Controlling redirects

Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
You just need to change the servlet context. Instead of deploying the portal to the root context, you should deploy it to the 'something' context. You'll also need to change the property 'portal.ctx' in portal-ext.properties.