Change the URL when we hit "c/portal/login"

Nisarg Parikh, modified 14 Years ago. Expert Posts: 262 Join Date: 12/31/09 Recent Posts
Hi All,

When we have to login to portal we can hit "http://hostname:port/c/portal/login" and it will display the Sign In portlet's page.
At that time the URL becomes "http://hostname:port/home?p_p_id=58&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&saveLastPath=0&_58_struts_action=%2Flogin%2Flogin"

The same thing happens when we try to access the page which does not have Guest role.

I have created a hook which changes the content of the Sign In page. That is one solution BUT I want to change this URL or I want to redirect it to another page.
Is this possible?

Please help me.

Thanks in Advance.

-Nisarg
thumbnail
Jay Patel, modified 14 Years ago. Regular Member Posts: 118 Join Date: 2/24/10 Recent Posts
Nisarg Parikh:
Hi All,

When we have to login to portal we can hit "http://hostname:port/c/portal/login" and it will display the Sign In portlet's page.
At that time the URL becomes "http://hostname:port/home?p_p_id=58&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&saveLastPath=0&_58_struts_action=%2Flogin%2Flogin"

The same thing happens when we try to access the page which does not have Guest role.

I have created a hook which changes the content of the Sign In page. That is one solution BUT I want to change this URL or I want to redirect it to another page.
Is this possible?

Please help me.

Thanks in Advance.

-Nisarg



Hi Nisarg,

You may check out in Control Panel -> Portal -> Settings -> General -> Default Landing & Logout page.

Regards,
Jay.
Nisarg Parikh, modified 14 Years ago. Expert Posts: 262 Join Date: 12/31/09 Recent Posts
Hi Jay,

Actually I have already tried it but I still have the same issue.

Thank you.

-Nisarg
thumbnail
Abhed Dekavadiya, modified 14 Years ago. Junior Member Posts: 74 Join Date: 10/5/10 Recent Posts
Nisarg Parikh:
That is one solution BUT I want to change this URL or I want to redirect it to another page.
Is this possible?


I am not exactly clear about your requirement. But this url is generated from LoginAction.execute() method. When you hit /c/portal/login, it executes struts action '/portal/login'.
<action path="/portal/login" type="com.liferay.portal.action.LoginAction" />


You can modify the LoginAction class through ext.
I hope this could help you!
Nisarg Parikh, modified 14 Years ago. Expert Posts: 262 Join Date: 12/31/09 Recent Posts
Hi Abhed,

Thanks for the information. That is the thing I want.

-Nisarg
Nisarg Parikh, modified 14 Years ago. Expert Posts: 262 Join Date: 12/31/09 Recent Posts
Hi All,

I finally got the proper solution.

in portal.properties there is one property.

#
# Enter a URL that will be used to login portal users whenever needed. By
# default, the portal's login page is used.
#
#auth.login.url=/web/guest/home

I just changed it to my community URL and it worked.

Thank you.

-Nisarg