Raised This Month: $51 Target: $400
 12% 

htaccess redirect?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr. Jan Itor
Veteran Member
Join Date: Mar 2008
Location: there.
Old 03-28-2010 , 07:53   htaccess redirect?
Reply With Quote #1

So I want to know how I can redirect everyone except users from Sweden to an English page,

This is what I have now:
Code:
RewriteEngine on

#For every other language (including English :)) use English
RewriteRule ^$ /en/index.htm [L,R=301]
How can I make an exception for people from Sweden to not get redirected? or do I have to do it in another way if so, how?
ty
__________________
Dr. Jan Itor is offline
8088
Veteran Member
Join Date: Jan 2008
Old 03-28-2010 , 09:35   Re: htaccess redirect?
Reply With Quote #2

Redirection based on country or ip can only be achieved by using a script.
http://www.google.com/search?q=redirect+by+country

But sometimes it makes more sense to redirect based on the user agent's language setting.
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
Stixsmaster
Veteran Member
Join Date: May 2007
Location: I am all around you...I
Old 03-28-2010 , 17:10   Re: htaccess redirect?
Reply With Quote #3

you can use meta tags for redirection...

---Stixsmaster
__________________
Stixsmaster is offline
Send a message via AIM to Stixsmaster Send a message via MSN to Stixsmaster
P4rD0nM3
Veteran Member
Join Date: Feb 2006
Old 03-28-2010 , 21:27   Re: htaccess redirect?
Reply With Quote #4

Redirecting based on user agent's language setting is definitely the best way to redirect users instead of by IP.
P4rD0nM3 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode