Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

WP Affiliate – links redirecting to localhost

by

Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › WP Affiliate Troubleshooting › WP Affiliate – links redirecting to localhost

  • This topic has 5 replies, 2 voices, and was last updated 11 years, 2 months ago by admin.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • May 3, 2014 at 10:40 am #10759
    TrainYourEars
    Member

    Hi there, I have just bought and installed WP-Affiliate. It is working fine but some links are redirecting to localhost instead of my real domain. Something like this:

    [http://localhost:21191/affiliate-program/?wp_affiliate_view=login]

    instead of:

    [http://www.trainyourears.com/affiliate-program/?wp_affiliate_view=login]

    In the referrals section I see things like:

    [http://localhost:28572/train-your-ears-eq-edition/?ap_id=testing_affiliate]

    instead of:

    [http://www.trainyourears.com/train-your-ears-eq-edition/?ap_id=testing_affiliate]

    It does not happen when I use:

    [http://www.trainyourears.com/wp-content/plugins/wp-affiliate-platform/affiliates/]

    I’ve tried to modify the header(“Location: members_only.php”); adding the full url:

    But it didn’t help.

    I have checked every single wp_option starting with wp_aff but nothing there as well.

    Never had this kind of problem before with any other plugin.

    I’m using Nginx on Heroku.

    I tried deactivating Cloudflare but that didn’t helped either.

    May 3, 2014 at 12:47 pm #62676
    admin
    Keymaster

    Did you set this up in local host then moved to your live site/host?

    If you edit a banner/link from the ads menu, what value do you see as the target URL?

    The affiliate plugin takes the URL values from your server. It is likely, some PHP server variables are not set correctly so it is failing to retrieve data correctly. Is this a home made server or did you buy hosting from a hosting company? Who is your hosting provider and which package are you using (if this is a hosting you purchased)?

    May 3, 2014 at 12:48 pm #62677
    TrainYourEars
    Member

    One a user goes to the site, the “ap_id” cookie is not set. For example:

    [http://www.trainyourears.com/train-your-ears-eq-edition/?ap_id=LuisHerranz]

    is not setting a cookie.

    I have tested a sale but it’s not working either. Not sure if it’s related with the problem above.

    May 3, 2014 at 12:50 pm #62678
    TrainYourEars
    Member

    — Did you set this up in local host then moved to your live site/host?

    I use heroku. It works with git and you deploy doing a push. I will try to unzip the folder manually and check if there’s any difference.

    — If you edit a banner/link from the ads menu, what value do you see as the target URL?

    If I edit a banner the URL is correct.

    May 3, 2014 at 12:59 pm #62679
    TrainYourEars
    Member

    I have the same problem unzipping directly from the .zip file.

    — Is this a home made server or did you buy hosting from a hosting company? Who is your hosting provider and which package are you using (if this is a hosting you purchased)?

    The website is hosted on Heroku.

    May 3, 2014 at 1:15 pm #62680
    admin
    Keymaster

    Yeah the cookie issue would be for the same reason. I will need to take a look at the system to get the variable details and see why the domain URL reading is going crazy on this install. I have sent you an email for it.


    Update: Turned out that the following server variable had wrong value set which was causing the issue (it had a value of “localhost”):

    $_SERVER["SERVER_NAME"]

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ