![]() |
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..... |
Your best bet is using PHP.
Then GeoIP the addresses using maxmind . com. Free version available. |
no possibility to do it in htaccess ?
|
Not that I know of, nope. Maybe look into mod_rewrite, but I doubt it.
|
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........ |
bump..........
|
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. |
In mod rewrites, the AND is implicit I thought. Did you try simply placing both rewrite conditions before the rewrite rule?
|
Here is what you want if you want to do both
Code:
RewriteEngine on hope this helps |
thank you very much, will try it....
|
All times are GMT -7. The time now is 11:40 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123