homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Gold Sponsor 2015!
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Redirect based on language using htaccess

10+ Year Member

Msg#: 406 posted 7:26 pm on Sep 29, 2003 (gmt 0)

I have a website with 100's of possible entry pages. Presently, approx 50% of my traffic is from spanish speaking countires. I would like to redirect all of this spanish traffic to one specified webpage on another domain. All other languages should continue to land on the page they request, without being redirected.

I have tried a few options in htaccess, but nothing works. I have read about the addlanguage command, and it looks like this might be my solution...but I'm confused as to how to write the code.

Any help would be greatly appreciated.




WebmasterWorld Administrator coopster us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 406 posted 8:20 pm on Sep 29, 2003 (gmt 0)

I've not dealt with this yet, but will be soon. I started reading about Apache Content Negotiation [httpd.apache.org]. I'm not sure if it is going to help you at all, but it's the best I could offer for now.

How are you intending to find out if your requester is Spanish-speaking or not? I wouldn't go off country domain name, well, not first anyway. I'd check the browser setting first, and give a default (home) page based on that. Then maybe check domain. Ultimately, I think you are going to need a language selection screen no matter what though. What if you have Spanish-speaking preferences in a country that you weren't expecting? Just some thoughts that I've had, and I'm sure you may be having...

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved