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-30-2010, 10:18 AM   #1
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
htaccess help....

I would like to setup redirection via htaccess...redirecting by referer and browser language together....only when surfer is refered by some site and his browser is in some language..then he would be redirected...

for example.... referer is aaa.com and language is ru ..... so how would htaccess line look like ?

thanks.....
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-30-2010, 10:56 AM   #2
Kiopa_Matt
Confirmed User
 
Industry Role:
Join Date: Oct 2007
Posts: 1,448
Your best bet is using PHP.

Then GeoIP the addresses using maxmind . com. Free version available.
__________________
xMarkPro -- Ultimate Blog Network Management
Streamline your marketing operations. Centralize management of domains, pages, Wordpress blogs, sponsors, link codes, media items, sales and traffic statistics, plus more!
Kiopa_Matt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-30-2010, 11:00 AM   #3
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
no possibility to do it in htaccess ?
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-30-2010, 11:01 AM   #4
Kiopa_Matt
Confirmed User
 
Industry Role:
Join Date: Oct 2007
Posts: 1,448
Not that I know of, nope. Maybe look into mod_rewrite, but I doubt it.
__________________
xMarkPro -- Ultimate Blog Network Management
Streamline your marketing operations. Centralize management of domains, pages, Wordpress blogs, sponsors, link codes, media items, sales and traffic statistics, plus more!
Kiopa_Matt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-30-2010, 11:40 AM   #5
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
well the problem is that i know those 2 rules in htaccess, don't know how to make one rule of them

RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?aaa.com(/)?.*$ [NC]
RewriteRule .* link_to_redirect [R]

this was by referer...


RewriteCond %{HTTP:Accept-Language} (ru) [NC]
RewriteRule .* redirect_to [L]

and this was by language........
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-30-2010, 01:10 PM   #6
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
bump..........
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-30-2010, 01:18 PM   #7
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
why do you wanna do both? usally its just 1, or is it for only 1 domain?

and if its 1 domain, why not redirect it without the language since its going to be the same domain all the time.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-30-2010, 01:23 PM   #8
Tom_PM
Porn Meister
 
Industry Role:
Join Date: Feb 2005
Posts: 16,443
In mod rewrites, the AND is implicit I thought. Did you try simply placing both rewrite conditions before the rewrite rule?
__________________
43-922-863 Shut up and play your guitar.
Tom_PM is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-30-2010, 01:37 PM   #9
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Here is what you want if you want to do both

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http(s)?://(.*\.)?google\.com/ [NC]
RewriteCond %{HTTP:Accept-Language} (ru) [NC]
RewriteRule .* http://www.google.ru [R,L]
will redirect if the refer is google and the language is russian, and will redirect to russian version of google (both have to be true or it wont redirect)

hope this helps
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-30-2010, 01:50 PM   #10
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
thank you very much, will try it....
klinton 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.