![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
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..... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
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! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
So Fucking Banned
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
|
no possibility to do it in htaccess ?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
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! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
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........ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
So Fucking Banned
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
|
bump..........
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Too lazy to set a custom title
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
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. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Too lazy to set a custom title
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] hope this helps
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
So Fucking Banned
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
|
thank you very much, will try it....
|
![]() |
![]() ![]() ![]() ![]() ![]() |