GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Is this doable ? (https://gfy.com/showthread.php?t=1329401)

grzepa 06-15-2020 01:41 AM

Is this doable ?
 
I have a considerable amount of type-in traffic on a domain let's say fuckass.com
is it possible to set it up so the traffic is split and sent to 3 different URLs ? Like 30% first url 30% second and so on.
I send it to a sponsor paysite tour but it recently stopped converting, so I'd like to test other tours but changing the URL forwarding manually @ registrar is quite time-consuming.

xxx6live 06-15-2020 02:22 AM

Just generate a random number from 1 to 3, then redirect to one of 3 sponsors depending on the number. Can be done in a few lines of PHP like below (or JavaScript). With enough traffic each should have about the same traffic in the end.

Quote:

$rnd = mt_rand(1,3);
switch ($rnd) {
case 1:
header("Location: https://sponsor1", true, 302);
break;
case 2:
header("Location: https://sponsor2", true, 302);
break;
case 3:
header("Location: https://sponsor3", true, 302);
break;
}

zijlstravideo 06-15-2020 06:07 AM

Assuming it's an old domain and there might be some old links pointing to "dead pages/dead links" on that domain, you might as well copy the code above and paste it in a 404.php file as well.

Then in your htaccess file add:
ErrorDocument 404 404.php

Which makes all dead links redirect too.

grzepa 06-16-2020 11:30 AM

Quote:

Originally Posted by xxx6live (Post 22685305)
Just generate a random number from 1 to 3, then redirect to one of 3 sponsors depending on the number. Can be done in a few lines of PHP like below (or JavaScript). With enough traffic each should have about the same traffic in the end.

thanks, I've created a index.php file, but after browsing it gives me this: https://nurufilms.com/1/

xxx6live 06-16-2020 11:52 AM

Quote:

Originally Posted by grzepa (Post 22685974)
thanks, I've created a index.php file, but after browsing it gives me this: https://nurufilms.com/1/

Sorry, try putting

Quote:

<?php
at the very first in that file, before anything else.

grzepa 06-16-2020 12:18 PM

thanks a lot man, works fine now !


All times are GMT -7. The time now is 09:02 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123