Forums de discussion

Redirecting the home page

Sadi Mortazavi, modifié il y a 13 années.

Redirecting the home page

New Member Publications: 16 Date d'inscription: 11/03/11 Publications récentes
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, modifié il y a 13 années.

RE: Redirecting the home page

Junior Member Publications: 53 Date d'inscription: 24/08/10 Publications récentes
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, modifié il y a 13 années.

RE: Redirecting the home page

New Member Publications: 16 Date d'inscription: 11/03/11 Publications récentes
Nick,

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

All the Best,

S