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
MarrisMarris 

Sites URL Redirect button reg.,

Doubt regarding URL redirect button in force.com sites detail page and how to use that. Can anyone provide me a sample or E.g.,

 

I just give my salesforce site url (sample.ap1.salesforce.com/apex/sitelogin) in source and my company support url in(mycompany.com/support) destination but it doesnt get redirected

 

What to do for redirection to happen ?

 

Plz provide me a help

 

Thanks
Marris

Best Answer chosen by Admin (Salesforce Developers) 
Alok_NagarroAlok_Nagarro

Hi Marris,

 

For example - I have a site with url "http://bhadauria-developer-edition.ap1.force.com/".

I have 2 pages named DemoPage and EmpForm, and DemoPage is active site home page means when i open the above site url DemoPage will open. Now i created a link named Go TO in DemoPage which redirects to EmpForm page.

 

Now i goto site details page and clicks on "Url Redirects" button, in Source URL fill -> /apex/EmpForm ( relative path not full) and in Target URL fill --> http://google.com

 

Now when you click on Go To link in DemoPage it will redirect to google.com rather than EmpForm page.

All Answers

Alok_NagarroAlok_Nagarro

Hi Marris,

 

I think you going good but in Source URL field the page location must :

  • Be a relative URL (not full url). It can have any valid extension type, such as .html or .php.
  • Not contain anchors, such as /siteprefix/page.html#target.
MarrisMarris

Hi Alok

 

              Thanks for the reply, Can you please provide me a good eg/samples for this?.It helps me a lot

 

 

Thanks

Marris

Alok_NagarroAlok_Nagarro

Hi Marris,

 

For example - I have a site with url "http://bhadauria-developer-edition.ap1.force.com/".

I have 2 pages named DemoPage and EmpForm, and DemoPage is active site home page means when i open the above site url DemoPage will open. Now i created a link named Go TO in DemoPage which redirects to EmpForm page.

 

Now i goto site details page and clicks on "Url Redirects" button, in Source URL fill -> /apex/EmpForm ( relative path not full) and in Target URL fill --> http://google.com

 

Now when you click on Go To link in DemoPage it will redirect to google.com rather than EmpForm page.

This was selected as the best answer
MarrisMarris

Hi alok

 

        Thanks man. I done it when you say it on the 1st post.

 

 

 

Thanks

Marris