Problem whit server

Popular automatic website translation tool

Problem whit server

Postby ravasiniferramenta » Tue Oct 20, 2015 2:01 pm

i've a problem with a SERVER_NAME variable in .haccess

on url the SERVER_NAME is
on url the SERVER_NAME is
on url the SERVER_NAME is

why not show ? it's a problem because more script in my site set url by server_name and now not work correctly

is there a way to set the correct server_name from .htaccess file?

now my configuration is :

RewriteCond %{HTTP:X-GT-Lang} ^$
RewriteCond %{HTTP_HOST} ^
RewriteCond %{SERVER_NAME} !\$ [NC]
RewriteRule (.*)$1 [R=301,L]

RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$$2 [R=301,L,QSA]
- See more at: server-name-variable-gtranslate-enterprise-t3577.html#sthash.yIGCE6P7.dpuf
Posts: 1
Joined: Tue Oct 20, 2015 1:55 pm

Re: Problem whit server

Postby Yana » Wed Oct 21, 2015 6:40 pm

You can detect current selected language by _SERVER['HTTP_X_GT_LANG'] variable and use it to generate correct domain name.

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Posts: 4547
Joined: Thu Jan 12, 2012 6:21 pm

  • Related Topics
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests