1public with sharing class pageurlclass{
2
3 /**
4 * Webkul Software.
5 *
6 * @category Webkul
7 * @author Webkul
8 * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
9 * @license https://store.webkul.com/license.html
10 */
11
12 public String headerdata{get;set;}
13 public string urlvalue{get;set;}
14 public string url{get;set;}
15
16 public pageurlclass(){
17
18 headerdata= ApexPages.currentPage().getHeaders().get('Host');
19
20 urlvalue=Apexpages.currentPage().getUrl();
21
22 url='https://' + headerdata+ urlvalue;
23 }
24
25
26}
27
1<apex:page controller="pageurlclass">
2
3 <!--
4 /**
5 * Webkul Software.
6 *
7 * @category Webkul
8 * @author Webkul
9 * @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https://webkul.com)
10 * @license https://store.webkul.com/license.html
11 */
12 -->
13
14 1. {!headerdata}
15
16 2. {!urlvalue}
17
18 3. {!url}
19
20</apex:page>
21