Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Change the URL when we hit "c/portal/login"
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
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
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.
Hi Jay,
Actually I have already tried it but I still have the same issue.
Thank you.
-Nisarg
Actually I have already tried it but I still have the same issue.
Thank you.
-Nisarg
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!
Hi Abhed,
Thanks for the information. That is the thing I want.
-Nisarg
Thanks for the information. That is the thing I want.
-Nisarg
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
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