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 10 years, 8 months ago by admin.
-
AuthorPosts
-
May 3, 2014 at 10:40 am #10759TrainYourEarsMember
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 #62676adminKeymasterDid 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 #62677TrainYourEarsMemberOne 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 #62678TrainYourEarsMember— 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 #62679TrainYourEarsMemberI 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 #62680adminKeymasterYeah 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"]
-
AuthorPosts
- You must be logged in to reply to this topic.