2016-12-13 3 views
1

연결합니다. 사용자 정의 페이지로 리디렉션하고 싶습니다. 가능한가요? 난 당신이 aff.php 파일에 약간의 수작업을하고이 같은 URL을 사용할 수 있다는 추측 첫 번째보기에서 Whmcs 사용자 정의 제휴 내가 제휴 시스템 (<a href="http://www.whmcs.com/" rel="nofollow noreferrer">whmcs</a>)에 가입하고 난 제휴 URL을받은

:

https://www.example.com/client/aff.php?aff=xxx&url=https://www.example.com/othersection 

답변

1

몇 시간 후, 나는 이것에 대한 해결책을 찾을 수 있었다. 단지 전에 파일 의 하단에, whmcs aff.php 내부 7.0.2의 최신 버전을 사용 :

// perform redirect 
header("HTTP/1.1 301 Moved Permanently"); 
header("Location: ".$whmcs->get_config('Domain'),true,301); 

https://www.example.com/client/aff.php?aff=xxx&url=othersection

내가 상대 URL의이 코드를 추가 한 :

if ($whmcs->get_req_var('url')) { 
    header("HTTP/1.1 301 Moved Permanently"); 
    header("Location: ".$whmcs->get_config('Domain')."/".$whmcs->get_req_var('url'),true,301); 
    die(); 
} 

또는 절대 URL의이 코드 :

.3.1 - - 7.0.2 - 7.1.0

617,451,515,
if ($whmcs->get_req_var('url')) { 
    header("HTTP/1.1 301 Moved Permanently"); 
    header("Location: ".$whmcs->get_req_var('url'),true,301); 
    die(); 
} 

https://www.example.com/client/aff.php?aff=xxx&url=https://www.example.com/othersection

이 코드는 버전 6.2.2을 사용할 것 같다