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 03-23-2002, 05:01 AM   #1
jojojo
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Vancouver, BC
Posts: 2,318
.htaccess experts please read and help..

Is it possible to detect the referring domain and re-direct the surfer somewhere else using .htaccess?

javascript won't let me redirect and also just ignore the redirects if it comes from somewhere it's supposed to - it wants to send them to ANOTHER page...

I just want to send surfers who click on a link to my site from a certain domain to be redirected somwhere otherwise the page would load fine...

how do yo do this without impacting the site itself? I am hoping .htaccess

I know it can be done using php but I have no idea how php works etc. - I need a more simplier solution :p

thx
jojojo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2002, 07:25 AM   #2
Big E
Registered User
 
Industry Role:
Join Date: Mar 2002
Location: San Diego, CA
Posts: 935
In either .htaccess or httpd.conf:

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://www.somedomain.com/$
RewriteRule ^.*$ http://www.someotherdomain.com
Big E is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2002, 07:33 AM   #3
jojojo
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Vancouver, BC
Posts: 2,318
thanks big E,

can you stick this file in a certain folder and have it effect just that folder?

and do you just repeat the line to add multiple domains to redirect from?

thanks
jojojo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2002, 08:32 PM   #4
Big E
Registered User
 
Industry Role:
Join Date: Mar 2002
Location: San Diego, CA
Posts: 935
You can, but you've got to make sure that you've got 'Options AllowOveride' for that directory in the httpd.conf as well.
Big E is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2002, 08:43 PM   #5
Muff
Confirmed User
 
Join Date: Mar 2001
Location: Toronto
Posts: 1,782
migth want to add one more line to that incase traffic is sent without the www.

not sure if it makes a difference or not.

RewriteCond %{HTTP_REFERER} ^http://somedomain.com/$
Muff 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.