Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
anand gopalan
Friendly URL
February 5, 2013 2:27 AM
Answer

anand gopalan

Rank: Expert

Posts: 401

Join Date: March 2, 2012

Recent Posts

HI,

I am creating Intranet site and current URL is http://pfin-fs1/web/guest/ and I want to use this Friendly URL

http://hradmin.in.abc-xyz.com

How to achieve this? Please help me
anand gopalan
RE: Friendly URL
February 7, 2013 3:28 AM
Answer

anand gopalan

Rank: Expert

Posts: 401

Join Date: March 2, 2012

Recent Posts

Hi,

Anybody know, how to achieve this? Please help me.

Regards
Anand
Ezequiel Turovetzky
RE: Friendly URL
February 7, 2013 10:23 AM
Answer

Ezequiel Turovetzky

Rank: New Member

Posts: 12

Join Date: July 4, 2012

Recent Posts

You should set hradmin.in.abc-xyz.com as the virtual host for the site (in Site Settings, public URL). That would the job.
anand gopalan
RE: Friendly URL
February 8, 2013 2:59 AM
Answer

anand gopalan

Rank: Expert

Posts: 401

Join Date: March 2, 2012

Recent Posts

Hi Ezeguiel,

see the attachment. I am getting the error. How to solve this?
Attachment

Attachments: friendlyURL.jpg (113.2k)
Ezequiel Turovetzky
RE: Friendly URL
February 8, 2013 8:31 AM
Answer

Ezequiel Turovetzky

Rank: New Member

Posts: 12

Join Date: July 4, 2012

Recent Posts

Seems that you have the same virtual host a Portal Settings level. You should keep that one in blank and use this one.

Also, remove http://
anand gopalan
RE: Friendly URL
February 10, 2013 9:53 PM
Answer

anand gopalan

Rank: Expert

Posts: 401

Join Date: March 2, 2012

Recent Posts

Hi,

After I follow your guideline, but it fail. please see the screenshot. Please let me know how to fix this issue.
Attachment

Attachment

Attachments: Portal_setting.jpg (95.7k), Site_setting.jpg (94.8k)
anand gopalan
RE: Friendly URL
February 10, 2013 10:55 PM
Answer

anand gopalan

Rank: Expert

Posts: 401

Join Date: March 2, 2012

Recent Posts

Hi,

now it is working with http://hradmin.in.pepperl-fuchs.com/web/guest/ but i want

when I type http://hradmin.in.pepperl-fuchs.com/ this url it should redirect to http://hradmin.in.pepperl-fuchs.com/web/guest/
Manish Yadav
RE: Friendly URL
February 11, 2013 12:05 AM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

Hi anand ,

you can define default.landing.page.path property in portal-ext.properties.

default.landing.page.path=/web/guest
and

company.default.home.url=/web/guest

reference you can get it from

Portal-ext.properties
anand gopalan
RE: Friendly URL
February 11, 2013 1:18 AM
Answer

anand gopalan

Rank: Expert

Posts: 401

Join Date: March 2, 2012

Recent Posts

Hi,

you mean i need to add this line in portal-ext.properties file

default.landing.page.path=http://hradmin.in.pepperl-fuchs.com/web/guest

company.default.home.url=http://hradmin.in.pepperl-fuchs.com
Manish Yadav
RE: Friendly URL
February 11, 2013 1:45 AM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

you have to add only below properties

company.default.home.url=/web/guest
default.landing.page.path=/web/guest
anand gopalan
RE: Friendly URL
February 11, 2013 2:01 AM
Answer

anand gopalan

Rank: Expert

Posts: 401

Join Date: March 2, 2012

Recent Posts

Hi Manish,

thank you for quick reply.

I shouldn't directly overwrite the portal-ext.properties files in portal-impl.jar file under webapps\ROOT\WEB-INF\lib

then I how i can edit this file. please send your comments.
Manish Yadav
RE: Friendly URL
February 11, 2013 3:30 AM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

anand gopalan:
Hi Manish,

thank you for quick reply.

I shouldn't directly overwrite the portal-ext.properties files in portal-impl.jar file under webapps\ROOT\WEB-INF\lib

then I how i can edit this file. please send your comments.



Check below path for portal-ext.properties. if file is not exist there you can create file with name of portal-ext.properties and restart server.

\webapps\ROOT\WEB-INF\classes\portal-ext.properties
Siby Mathew
RE: Friendly URL
February 11, 2013 5:12 AM
Answer

Siby Mathew

Rank: Expert

Posts: 259

Join Date: March 4, 2011

Recent Posts

Hi Manish/Anand,
You can put your portal-ext.properties in the same level as the deploy folder. Liferay will automatically use it.

Thanks,
Siby
anand gopalan
RE: Friendly URL
February 11, 2013 8:41 PM
Answer

anand gopalan

Rank: Expert

Posts: 401

Join Date: March 2, 2012

Recent Posts

Hi Manish/Siby,

After I have added below line in the portal-ext.properties.

company.default.home.url=/web/guest
default.landing.page.path=/web/guest

when i type this URL : http://hradmin.in.pepperl-fuchs.com I am getting this error. please let me know how to fix this issue.


logs show the error message:
04:06:14,740 ERROR [VirtualHostFilter:301] java.lang.IllegalArgumentException: Path hradmin.in.pepperl-fuchs.com does not start with a "/" character
java.lang.IllegalArgumentException: Path hradmin.in.pepperl-fuchs.com does not start with a "/" character
at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:432)
at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java:223)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:296)

.....................
.....................
04:06:14,755 ERROR [I18nServlet:106] java.lang.IllegalArgumentException: Path ;jsessionid=03EDBB1F3E97BD4121A376488089810E does not start with a "/" character
java.lang.IllegalArgumentException: Path ;jsessionid=03EDBB1F3E97BD4121A376488089810E does not start with a "/" character
at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:432)
at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java:223)

Screenshot:
Attachment

Attachments: error_message1.jpg (40.2k), stdout.log (134.8k)
anand gopalan
RE: Friendly URL
February 12, 2013 3:38 AM
Answer

anand gopalan

Rank: Expert

Posts: 401

Join Date: March 2, 2012

Recent Posts

Hi,

Any suggestion or guideline. Please let me know how to fix this issue.
Manish Yadav
RE: Friendly URL
February 12, 2013 4:35 AM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

is it working with ....<IP> or localhost:<portnumber>
anand gopalan
RE: Friendly URL
February 12, 2013 8:06 PM
Answer

anand gopalan

Rank: Expert

Posts: 401

Join Date: March 2, 2012

Recent Posts

Hi Manish,

its working with Machine name as well as IP Address.

Machine Name: pfin-fs1

url: http://pfin-fs1/web/guest


ip address: 192.168.100.239

http:// 192.168.100.239/web/guest
anand gopalan
RE: Friendly URL
February 13, 2013 3:26 AM
Answer

anand gopalan

Rank: Expert

Posts: 401

Join Date: March 2, 2012

Recent Posts

Hi All,

I fixed the issue. Thanks for your support & guideline.

Regards
Anand
Manish Yadav
RE: Friendly URL
February 13, 2013 4:11 AM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

Hi Anand could you post your solution how you achieved ,it will be guidance for others. if possible for you could you post full steps of vitural hosting
anand gopalan
RE: Friendly URL
February 13, 2013 11:18 PM
Answer

anand gopalan

Rank: Expert

Posts: 401

Join Date: March 2, 2012

Recent Posts

Hi Manish,

Steps to follow for Friendly URL

1. add friendly URL in the Site setting
Public page: hradmin.in.abc-xyz.com/web/guest

2. add below line in the Portal-ext.properties
company.default.home.url=/web/guest
default.landing.page.path=/web/guest

3. Don't enter anything in HOME URL in Portal setting page

4. Add default Landing page in the portal setting

for example:/web/guest

Hope it will help for others.