Using mod re write to automatically translate pages

Discussion in 'Apache' started by m0nkeymafia, Mar 10, 2008.

  1. #1
    Hi everyone,

    I'm looking to use a mod rewrite to provide my website in other languages via subdomain.

    An example of what I am trying to achieve is this:
    Someone accesses it.mysite.com [it is an abbreviation for italian]

    In .htaccess I have the following:
    
    RewriteCond %{HTTP_HOST} ^it\.mysite\.com
    RewriteRule ^(.*)$ http://www.google.com/translate_c?hl=it&sl=en&u=http://mysite.com/$1 [L]
    
    Code (markup):
    This does not maintain the original URL, but redirects to the google translate page, it also keeps the banner at the top... Any ideas on how to maintain the original URL, i.e. it.mysite.com and secondly not show the frame at the top?

    Thanks
     
    m0nkeymafia, Mar 10, 2008 IP
  2. Isaak

    Isaak Guest

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    A better solution would be to manually translate pages and put them available under the right subdomain on your server, this would increase performance and user experience much more.
     
    Isaak, Mar 12, 2008 IP