I have a website ( that I have set up to support 8 languages.  Based on a query string I load up the correct languages string.  For instance: will show French and will show German

This works out great since the user can, if they need to, change langauges very quickly.

What I'd like to do, on the main page ( and that page only, is the first time teh page is loaded in that session, to guess what the language is and default the page to that.  

So by using Request.ServerVariables("HTTP_ACCEPT_LANGUAGE") to get the language on, I'd like the page to refresh and somehow work like the others.  So if a user came to default.asp and their language was FR, it would show the French page but allow them to change if necssary.  The best way I figured so far is to, on, to a Response.Redirect to 

BUT I thought while surfing the net, that Yahoo! and Google frown on redirects and I don't want to get the site penalized in search rankings.

Any ideas?

Who is Participating?
BuzConnect With a Mentor Commented:
Why redirect?

Assuming that your script checks for the value of request.querystring("lang") somewhere in the code, prior to any data display or DB query, all you need to do is: (Sorry for any syntax errors, haven't wrote ASP for a while)

if request.querystring("lang")="" then
  User_Lang = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
  User_Lang = request.querystring("lang")
end if

Now use User_Lang in your script as the page language.
redirects are fine if your using them constructively IMO ,  or you  can look at Server.Transfer("url")  which doesn't hit the browser
csullinsAuthor Commented:
That was perfect!  Thanks :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.