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)
-   -   Couple of Questions about .htaccess (https://gfy.com/showthread.php?t=1113634)

nexcom28 06-26-2013 08:23 AM

Couple of Questions about .htaccess
 
If you know the answer to either of these, please can you share..

1. Using .htaccess can I determine a referral domain and send the visitor to a site depending on site.
For example;
If Site A then redirect mysite3.com
If Site B then redirect mysite1.com
If site C then redirect mysite 2.com

2. I have domains that redirect to my main site and they receive traffic in their own right. Currently the sites 301 redirect using .htaccess however I would like to anayze the traffic from these domains, what is the best way to do this? (before it hits my main site)

Juicy D. Links 06-26-2013 09:12 AM

Code:

RewriteCond %{HTTP_REFERER} \.SITEINHERE\. [NC,OR]
RewriteRule . mysite1.com [L]




Someone just check the syntax for me

freecartoonporn 06-26-2013 10:25 AM

1. yes

1st make sure which redirected you wanna use 301/302

then use google for code and use it.

2. how do you want to analyze the traffic ?
if you want your script to analyze then your best bet would be send all traffic to index.php and make the php do the redirection.. instead of htaccess

Why 06-26-2013 02:06 PM

something like this should work:

Code:

RewriteCond %{http_referer} ^http://([^.]+.)*(somesite).com
RewriteRule ^$ ?ref=somesite.com [R=302,L]

then you can attach a variable to the end of the request. hook that into whatever analytics system you are already using.

MichaelP 06-26-2013 02:09 PM

Quote:

Originally Posted by Why (Post 19688204)
something like this should work:

Code:

RewriteCond %{http_referer} ^http://([^.]+.)*(somesite).com
RewriteRule ^$ ?ref=somesite.com [R=302,L]

then you can attach a variable to the end of the request. hook that into whatever analytics system you are already using.

Hum Useful,. Txs for sharing :thumbsup


All times are GMT -7. The time now is 09:10 AM.

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