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
V AnandV Anand 

how to hide id in url ?

Hi......... I have created a vf page for force.com sites In that page I am passing id with page name like.... outputLink value="/apex/childdetail?id={!cont.id}"> Read more
JPClark3JPClark3

What do you mean by "Read More"?

Alok_NagarroAlok_Nagarro

Hi,

 

If you are using simple outputLink or anchor tag for link then it's not fisible as i think, since in both case you make GET request and in this case you need to pass parameter with url, However you can use commandLink action component of VF .

example -

 

<apex:commandLink action="{!goTo}" value="Read More" target="_blank"/>

 

/**** in the controller ********/

 

public PageReference goTo()
 {
  PageReference pr=new PageReference('/apex/childdetail');
  pr.getParameters().put('id',place Id here);
  return pr;
 }


SamuelDeRyckeSamuelDeRycke

If you want to rewrite the URLs of your force.com sites visualforce pages, you can use the Site.UrlRewriter interface.

 

quoting the documentation:

"

For example, let's say that you have a blog site. Without URL rewriting, a blog entry's URL might look like this: http://myblog.force.com/posts?id=003D000000Q0PcN

With URL rewriting, your users can access blog posts by date and title, say, instead of by record ID. The URL for one of your New Year's Eve posts might be: http://myblog.force.com/posts/2009/12/31/auld-lang-syne

You can also rewrite URLs for links shown within a site page. If your New Year's Eve post contained a link to your Valentine's Day post, the link URL might show: http://myblog.force.com/posts/2010/02/14/last-minute-roses"