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

Using URLFOR with UrlRewriting [rewritten URL not displaying]



I have written a UrlRewriter class and implemented the generateUrlFor().

The basic URL is :


The rewriter takes the URL and rewrites it to

On the page I am using:

<apex:outputLink value="{!URLFOR($Page.CPDownloads, null, ['param1' = param1Val, 'param2' = param2Val, 'param3' = param3Val])}">{!$Label.Home_downloadDocuments}</apex:outputLink>


param1Val, param2Val, and param3val are all defined in the controller.


My tests run fine. I can see the output in the debug logs displaying the correct URL being sent to the new PageReference(url) and being returned. However, is being displayed as the link on the page. 


If I only specify on parameter it works:

<apex:outputLink value="{!URLFOR($Page.CPDownloads, null, ['param1' = param1Val] )}">{!$Label.Home_downloadDocuments}</apex:outputLink>


Has anyone seen this before or can tell me what I am missing?


Thanks in advance,