function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BallalBallal 

URL Rewriter Class help

I have a query regarding URL Rewriter class if anyone could help me with that. I am very new to Apex classes and have not written Apex classes before. I have tried searching on the forum for help on URL Rewriter classes but most discussions give examples of URL Rewriter classes for CMSForce pages. I do not have CMSForce pages but standard Salesforce Apex pages.

What I want to do is to write a URL Rewriter class which will hide the Salesforce URL’s for my Customer portal pages and display some friendly URLs instead. I am using a Force.com site to login to my Customer Portal. I have overridden all my tabs with Apex pages. For example I have overridden my "Entitlements" tab. I have created a new tab called "My Entitlements" and overrid it with an Apex page so that when I click ‘My Entitlements” tab I get a list view of only my entitlements (I choose which list view to display). I did that so that I do not get the usual Recently viewed items list.

Example:

My entitlements tab has a URL as follows:

{Default Web Address for my Site}/apex/My_Entitlements?sfdc.tabName=01r20000000EyhR

(so i get the id for the list in the URL which I want to hide)

 

I want to use URL rewriter class to display it like this:

{Default Web Address for my Site}/My_Entitlements

 

Could you help me on this? Does anyone have some example apex class code that they could share?

 

regards,

 

Ballal

Ryan-GuestRyan-Guest

Take a look at this post for an example of how to use the URL Rewriter:

 

http://boards.developerforce.com/t5/Force-com-Sites/URL-Rewriter-and-Test-Class/td-p/226203

 

Let me know if this stirs up any additional questions.