Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-26-2013, 08:23 AM   #1
nexcom28
So Fucking Banned
 
Join Date: Jan 2005
Posts: 3,716
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)
nexcom28 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2013, 09:12 AM   #2
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
Code:
RewriteCond %{HTTP_REFERER} \.SITEINHERE\. [NC,OR]
RewriteRule . mysite1.com [L]



Someone just check the syntax for me
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2013, 10:25 AM   #3
freecartoonporn
Confirmed User
 
freecartoonporn's Avatar
 
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
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
freecartoonporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2013, 02:06 PM   #4
Why
MFBA
 
Industry Role:
Join Date: Mar 2003
Location: PNW
Posts: 7,230
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.
Why is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2013, 02:09 PM   #5
MichaelP
Registered User
 
Industry Role:
Join Date: Aug 2003
Location: QWEBEC Corporate Office
Posts: 7,124
Quote:
Originally Posted by Why View Post
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
MichaelP is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.