magcshroom Posted March 29, 2009 Share Posted March 29, 2009 Ok, so basically i am using this existing code to redirect to a different page. I send traffic from adwords to www.mydomain.com/site1.php, which forwards to www.mydomain.com/page/. The referrer of the next page www.google.com shows www.mydomain.com/page/. If i were to do a header redirect, it would show www.mydomain.com/site1.php as the referrer, which is no good. So, my problem lies with the script not redirecting fast enough. My page loads, and then it redirects, but it is very slow. I don't want them to see the page if possible, but it still needs to pass on the referrer. <?php $site1 = "http://www.mydomain.com/site1.php"; $affiliate_link = "http://www.mydomain.com/page/"; if($_SERVER['HTTP_REFERER'] == $site1) { echo "<body onload=\"javascript:frmClickTracking.submit();\">"; echo "<form action=\"" . $affiliate_link . "\" method=\"post\" name=\"frmClickTracking\">"; echo "</form>"; } ?> Link to comment https://forums.phpfreaks.com/topic/151587-php-redirect-after-page-loads/ Share on other sites More sharing options...
redarrow Posted March 29, 2009 Share Posted March 29, 2009 maybe it a case off using mod_rewrite pal. never known how they forward traffic, and not seeing the link, i am pretty sure they use a set of mod_rewrite rules. or a 3rd party dns service. Link to comment https://forums.phpfreaks.com/topic/151587-php-redirect-after-page-loads/#findComment-796135 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.