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 sites In that page I am passing id with page name like.... outputLink value="/apex/childdetail?id={!}"> Read more

What do you mean by "Read More"?




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;


If you want to rewrite the URLs of your 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:

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:

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:"