By default, WHMCS redirects accesses to affiliate links to the home page of the client area, to overcome this limitation and offer better results to our affiliates, we create a hook that changes that pattern.
The following code allows you to create custom affiliate links with redirection to different URLs, which can be defined through an additional parameter at the end of the affiliate link itself, or set custom redirects to specific affiliates Directly in the hook code.
The next step is to edit the default target, in the l
ine 10altere the URL by the default destination address that you want to redirect affiliate links (https://example.com).
17, you can define a specific affiliate to redirect access to your referral link, replace the value 1 with th
e affiliate ID and on line 18
replace the sample URL with the specific target URL of this affiliate.
If you want to add the same condition to other affiliates, you can copy and paste line
to 21 and paste just below line 21, changing the values as explained earlier.
Now the best part: The default format of the affiliate URLs is
gofas.net/cliente/aff.php?aff=7, with hook installed, to set directly on the affiliate indication link the customized destination, just add the page (& page =)
ter shortly after the affiliate ID.
Default URL Example of affiliates:
Custom REDIRECT URL example:
I hope it helps. And if you want to know our affiliate program contact us, we offer exclusive advantages and passes with very special values for indications;)