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
Amitkumar15Amitkumar15 

Redirect to Site Pages from VF page

I have one vf page in which there are two links. both link should open different site pages.

 

And these site pages should open from this link only and not directly.

 

Any help on this?

souvik9086souvik9086

Hi,

 

Try this

 

<apex:page >
  <a href="http://google.com"> please Click the first site link</a>
<a href="http://google.com"> please Click the second site link</a> </apex:page>

Please replace those urls with your site urls.

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

ryanjuptonryanjupton

Could you clarify this statement?

 

"And these site pages should open from this link only and not directly."

 

Are you saying you want to prevent the Site page from displaying is anyone tries to access the URL directly rather than going through the Visualforce page you mention?

Amitkumar15Amitkumar15

Yes exactly ryanjupton...

 

I want to prevent these site URL to access directly.

Amitkumar15Amitkumar15

Any help on this requirement?

souvik9086souvik9086

The above code doesn't work?

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

Amitkumar15Amitkumar15

No Souvik....that will not work.since i have to restrict site page to open directly from viewing..

 

 

Any help on this?