How to redirect affiliate mini-site (affiliates/index.php) to your own url

If you want to redirect url: POSTAFFILIATEPRO_URL/affiliates/  to your own url, you can do it by changing template file: main_static_html_doc.stpl
 
 
In Merchant Panel > Configuration > Design > Signup page theme > Edit theme > search file 'main_static_html_doc.stpl'
 
add this code right below <head> tag (instead of www.qualityunit.com write redirect url):
<script language="javascript" type="text/javascript">
var filename = location.pathname.split('/').slice(-1)[0];
if (filename == '' || filename == 'index.php') window.location.href='https://www.qualityunit.com';
</script>
Whole template file content after change will look:
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <script language="javascript" type="text/javascript">
            var filename = location.pathname.split('/').slice(-1)[0];
            if (filename == '' || filename == 'index.php') window.location.href='https://www.qualityunit.com';
        </script>
        {include file='static_page_includes.stpl'}
    </head>
    <body>
        {include file='header.stpl'}
        {$staticPage}
        {include file='footer.stpl'}
    </body>
</html>
 
×