SERVER_NAME variable - Gtranslate Enterprise

Popular automatic website translation tool

SERVER_NAME variable - Gtranslate Enterprise

Postby simone.ceschi » Fri Apr 25, 2014 8:50 pm

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

on url http://www.fershop.it the SERVER_NAME is http://www.fershop.it
on url fershop.it the SERVER_NAME is fershop.it
on url en.fershop.it the SERVER_NAME is fershop.it

why not show en.fershop.it ? 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 :

Code: Select all
RewriteCond %{HTTP:X-GT-Lang} ^$
RewriteCond %{HTTP_HOST} ^fershop.it
RewriteCond %{SERVER_NAME} !\.fershop\.it$ [NC]
RewriteRule (.*) http://www.fershop.it/$1 [R=301,L]

RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ http://$1.fershop.it/$2 [R=301,L,QSA]
simone.ceschi
 
Posts: 5
Joined: Fri Apr 18, 2014 5:31 pm

Re: SERVER_NAME variable - Gtranslate Enterprise

Postby Edvard » Fri Apr 25, 2014 8:56 pm

Hi,

It is by design. What is the reason you want to use en.fershop.it instead of freshop.it?

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

Let me know.

Thanks!
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: SERVER_NAME variable - Gtranslate Enterprise

Postby simone.ceschi » Fri Apr 25, 2014 9:05 pm

because in more script i need to load or set data from a page , and if the url is not same , the script cannot work correctly .. for example now user cannot complete order because the page not set state/province information

you know if is possible to set server_name from .htaccess ?
simone.ceschi
 
Posts: 5
Joined: Fri Apr 18, 2014 5:31 pm

Re: SERVER_NAME variable - Gtranslate Enterprise

Postby Edvard » Fri Apr 25, 2014 9:06 pm

No, it is not possible.

Why you do not use relative URL instead?
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: SERVER_NAME variable - Gtranslate Enterprise

Postby simone.ceschi » Fri Apr 25, 2014 9:15 pm

because in more script i cannot change source code.. i will ask at the company who produced the script .. thanks !
simone.ceschi
 
Posts: 5
Joined: Fri Apr 18, 2014 5:31 pm

Re: SERVER_NAME variable - Gtranslate Enterprise

Postby Edvard » Fri Apr 25, 2014 9:20 pm

If it is a javascript cross domain issue you may also use access control origin header to allow subdomains call to main site.
Regards,

Edvard Ananyan - 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
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux