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)
-   -   .htaccess question (https://gfy.com/showthread.php?t=870299)

whatif_3 11-19-2008 01:11 PM

.htaccess question
 
is there a way i can give all my type-in traffic a referrer code? i think i can do this in htaccess, any ideas?

donborno 11-19-2008 01:38 PM

You can redirect the traffic without a referrer to a different URI, look for mod_rewrite to do this.

Or you can check the referrer using JavaScript and change all links.

whatif_3 11-19-2008 01:46 PM

Quote:

Originally Posted by donborno (Post 15078104)
You can redirect the traffic without a referrer to a different URI, look for mod_rewrite to do this.

Or you can check the referrer using JavaScript and change all links.

thanks for the reply man, ill check this out :thumbsup

donborno 11-19-2008 02:13 PM

Actually I wrote something similar in JavaScript some time ago, here you go:
Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
        <title>Amazing MGP</title>
        <script type="text/javascript">
        function change_referral_code(old_code, new_code) {
                // fetch all links
                var links = document.getElementsByTagName('a');

                for (var i = 0; i < links.length; i++) {
                        alert(links[i].href);
                        links[i].href = links[i].href.replace(new RegExp(old_code), new_code);
                }
        }

        function change_all_referrals() {
                // If there is no referrer
                if ((document.referrer == null) || (document.referrer == "")) {
                        change_referral_code('revid=11111', 'revid=22222');
                        // ... add some more for other sponsors
                }
        }
        </script>
</head>
<body onload="change_all_referrals()">
        <h1>Amazing MGP</h1>

        <p>Here are some galleries for you:</p>
        <ul>
                <li><a href="http://www.pinkvisualhdgalleries.com/asp/008/01/vid?campaign=0&revid=11111&s=1">Gallery 1</a></li>
                <li><a href="http://www.pinkvisualhdgalleries.com/asp/010/01/vid?campaign=0&revid=11111&s=1">Gallery 2</a></li>
                <li><a href="http://www.pinkvisualhdgalleries.com/asp/020/01/vid?campaign=0&revid=11111&s=1">Gallery 3</a></li>
                <li><a href="http://www.pinkvisualhdgalleries.com/asp/028/01/vid?campaign=0&revid=11111&s=1">Gallery 4</a></li>
                <li><a href="http://www.pinkvisualhdgalleries.com/asp/030/01/vid?campaign=0&revid=11111&s=1">Gallery 5</a></li>
        </ul>
</body>
</html>

Didn't test it in real life

whatif_3 11-19-2008 04:06 PM

Quote:

Originally Posted by donborno (Post 15078255)
Actually I wrote something similar in JavaScript some time ago, here you go:
Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
        <title>Amazing MGP</title>
        <script type="text/javascript">
        function change_referral_code(old_code, new_code) {
                // fetch all links
                var links = document.getElementsByTagName('a');

                for (var i = 0; i < links.length; i++) {
                        alert(links[i].href);
                        links[i].href = links[i].href.replace(new RegExp(old_code), new_code);
                }
        }

        function change_all_referrals() {
                // If there is no referrer
                if ((document.referrer == null) || (document.referrer == "")) {
                        change_referral_code('revid=11111', 'revid=22222');
                        // ... add some more for other sponsors
                }
        }
        </script>
</head>
<body
        <h1>Amazing MGP</h1>

        <p>Here are some galleries for you:</p>
        <ul>
                <li><a href="http://www.pinkvisualhdgalleries.com/asp/008/01/vid?campaign=0&revid=11111&s=1">Gallery 1</a></li>
                <li><a href="http://www.pinkvisualhdgalleries.com/asp/010/01/vid?campaign=0&revid=11111&s=1">Gallery 2</a></li>
                <li><a href="http://www.pinkvisualhdgalleries.com/asp/020/01/vid?campaign=0&revid=11111&s=1">Gallery 3</a></li>
                <li><a href="http://www.pinkvisualhdgalleries.com/asp/028/01/vid?campaign=0&revid=11111&s=1">Gallery 4</a></li>
                <li><a href="http://www.pinkvisualhdgalleries.com/asp/030/01/vid?campaign=0&revid=11111&s=1">Gallery 5</a></li>
        </ul>
</body>
</html>

Didn't test it in real life

thank you very much for helping, you are very kind to take the time out of your day to assist, its appreciated

u-Bob 11-19-2008 04:37 PM

all of your type-in traffic? No.
some of it? yes

depends on the browser.

whatif_3 11-19-2008 04:41 PM

Quote:

Originally Posted by u-Bob (Post 15078897)
all of your type-in traffic? No.
some of it? yes

depends on the browser.

well, we are using google analytics right now(which does not record referring urls), and just got a new affiliate software package, so i wanted to see if i could get it on the type in traffic in order to get as close to all traffic going through the affiliate system


All times are GMT -7. The time now is 03:41 PM.

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