Foros de discusión

Redirecting the home page

Sadi Mortazavi, modificado hace 13 años.

Redirecting the home page

New Member Mensajes: 16 Fecha de incorporación: 11/03/11 Mensajes recientes
Dear Team,

How can I redirect the login page from /home to one of the sites created in Social Office? I tried using the Default Landing Page setting in the control panel, but this does not create a redirect?

Many Thanks,

S
Nick Willey, modificado hace 13 años.

RE: Redirecting the home page

Junior Member Mensajes: 53 Fecha de incorporación: 24/08/10 Mensajes recientes
Hi Sadi,

You can accomplish this by modifying the following file: webapps/so-portlet/WEB-INF/classes/portal.properties

The two properties you will want to change are:

#auth.forward.by.last.path=false
auth.forward.by.last.path=true

#login.events.post=com.liferay.so.hook.events.LoginPostAction

In my experience, setting the first to true allows you to use the 'Navigation' options in Control Panel/Settings. Commenting out the second option prevents the login hook from running, which if you looked at the source you would see it sets the default landing page to /web/user_name/home.

Of course you'll need to either restart the app server or undeploy/redeploy so-portlet after any changes to the portal.properties.

Now you should be able to change the default landing page as needed from the Control Panel.

Nick
Sadi Mortazavi, modificado hace 13 años.

RE: Redirecting the home page

New Member Mensajes: 16 Fecha de incorporación: 11/03/11 Mensajes recientes
Nick,

Thank you very much for your help. This did the trick.

All the Best,

S