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

URL Rewrite - How To Remove/Not-Display Querystring Parameters



I am using URLRewriting and it works quite well for my requirements.  Therefore if I have for example links with "/test1", "/test2", "/test3" etc I can access my page https://mydevorg/sitehome/test1  and this works perfectly.  I wish to also rewrite (hide) url parameters if parameters are contained in the URL


Therefore /test1?param1=hello&param2=goodbye  would display to the user as "https://mydevorg/sitehome/test1" and not "https://mydevorg/sitehome/test1?param1=hello&param2=goodbye"


Do you know if this is possible?  


Thanks in advance for any help.


Adding to the above.  What I need to do in effect is rewrite an external url to a different external url.  As the generateUrlFor function is for internal-to-external I don't think it will perform what I need.

Hi SalesRed,

Were you able to find a solution for the issue mentioned? I am currenly facing same problem when 2 or more parameters are passed.
James (CloudAnswers)James (CloudAnswers)
Instead of instanciating the PageReference with a string, did you try `getParameters().put('param1', 'val1);` to load the PageReference instance with parameters?