Fórum

Redirecting the home page

Sadi Mortazavi, modificado 13 Anos atrás.

Redirecting the home page

New Member Postagens: 16 Data de Entrada: 11/03/11 Postagens Recentes
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 13 Anos atrás.

RE: Redirecting the home page

Junior Member Postagens: 53 Data de Entrada: 24/08/10 Postagens Recentes
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 13 Anos atrás.

RE: Redirecting the home page

New Member Postagens: 16 Data de Entrada: 11/03/11 Postagens Recentes
Nick,

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

All the Best,

S