Friendly URL

WebSphere Portal 6.1 introduced concept of friendly URL, what that does is, let you set a friendly URL at the time of creating page. Friendly URL is different than the url mapping in following aspects

  1. By default the friendly URLs are disabled and you need to enable it

  2. The actual URL that you use for accessing page using friendly URL, is made of all the URL's starting from root. Ex. If you create a page under Home page and assign friendly URL testurl to it then you will have to first assign a friendly url to to Home page say home. Then final url for your page will be /home/testurl. In URL mapping you can directly assign a URL to any child page

These are the steps that i used to create Friendly URL mapping on my portal, First set value of friendly.enabled property to true in ConfigService like this

After enabling this property now when you either create new page or when you go to Manage Properties button of the existing page you will get "Friendly URL name" input like this

Use the manage properties, portlet to assign URL labels to every page from Home to your destination page. In my case page hierarchy is like this Root -> Home -> fun -> Test URL. I did assign name home to Home page and fun to fun page and testurl to Test URL page. Now i can access Test URL page using /home/fun/testurl

If you create a URL mapping using URL mapping portlet then it gets stored like this in xmlaccess

<url-mapping-context action="update" domain="rel" label="flashquery" objectid="C_VVILMKG1089N00I2U8SB9F00G2">
<access-control externalized="false" owner="uid=wasadmin,o=defaultwimfilebasedrealm" private="false"/>
<portal-url resourceref="6_VVILMKG10G04D0I2C4HO3V0007" update="set"/>

If you assign friendly URL to a page then it gets stored as value of parameter in the page level metadata

<content-node action="update" active="true" allportletsallowed="true" content-parentref="6_CGAH47L008IC40I4BOR2EO00I3"
create-type="explicit" domain="rel" objectid="6_VVILMKG100GBC0I2F1UTLJ0001" ordinal="1300" type="page">
<supported-markup markup="html" update="set"/>
<localedata locale="en">
<title>Test Page</title>
<parameter name="" type="string" update="set"><![CDATA[false]]></parameter>
<parameter name="" type="string" update="set"><![CDATA[Yes]]></parameter>
<parameter name="" type="string" update="set"><![CDATA[testurl]]></parameter>
<parameter name="" type="string" update="set"><![CDATA[0]]></parameter>
<parameter name="" type="string" update="set"><![CDATA[NON-SHARED]]></parameter>


Anonymous said...

Thanks very much for this. I spent a day pulling my hair out and not seeming to find anything in IBM's InfoCenter before coming across this article that explained it all.

Anonymous said...

When I follow the instructions I get a bad redirect like the following

The page isn't redirecting properly


Anonymous said...

nice one

Ecommerce developer said...
This comment has been removed by a blog administrator.
Rodney Rear said...

I just had an indefinite redirect problem caused by adding a friendly URL. I found I had to make a friendly URL that was different from the page name. Likely it was interpreting the page name as the friendly URL and going through the loop again.

Anonymous said...

Thanks a lot for your post, it did help me perfectly. Nice solution..

prathiba palanisami said...

Thanks a lot ..!!! A good post.

srjwebsolutions said...

We are leading responsive website designing and development company in Noida.
We are offering mobile friendly responsive website designing, website development, e-commerce website, seo service and sem services in Noida.

Responsive Website Designing Company in Noida
Website Designing Company in Noida
SEO Services in Noida
SMO Services in Noida

Vikas Chaudhary said...

Battery Mantra is Authorized exide car battery dealer in Noida and Greater Noida. We are providing our service in Indirapuram, Delhi, Ashok Nagar.

Exide Battery Dealer in Noida
Battery Dealer in Noida
Authorized Battery Dealer in Noida
Car Battery Dealer in Noida
Car Battery Dealer
Exide Battery Dealer

EG MEDI said... is online medical store pharmacy in laxmi nagar Delhi. You can Order prescription/OTC medicines online.
Cash on Delivery available. Free Home Delivery

Online Pharmacy in Delhi
Buy Online medicine in Delhi
Online Pharmacy in laxmi nagar
Buy Online medicine in laxmi nagar
Onine Medical Store in Delhi
Online Medical store in laxmi nagar
Online medicine store in delhi
online medicine store in laxmi nagar
Purchase Medicine Online
Online Pharmacy India
Online Medical Store