Forum Archive - SERVER_NAME variable - Gtranslate Enterprise

SERVER_NAME variable - Gtranslate Enterprise
Apr 25, 2014 4:50 pm by simone.ceschi
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 : 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]
Re: SERVER_NAME variable - Gtranslate Enterprise
Apr 25, 2014 4:56 pm by Edvard
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!
Re: SERVER_NAME variable - Gtranslate Enterprise
Apr 25, 2014 5:05 pm by simone.ceschi
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 ?
Re: SERVER_NAME variable - Gtranslate Enterprise
Apr 25, 2014 5:06 pm by Edvard
No, it is not possible. Why you do not use relative URL instead?
Re: SERVER_NAME variable - Gtranslate Enterprise
Apr 25, 2014 5:15 pm by simone.ceschi
because in more script i cannot change source code.. i will ask at the company who produced the script .. thanks !
Re: SERVER_NAME variable - Gtranslate Enterprise
Apr 25, 2014 5:20 pm by Edvard
If it is a javascript cross domain issue you may also use access control origin header to allow subdomains call to main site.

SIMILAR TOPICS

Gtranslate MultisiteFeb 12, 2019 7:27 amReplies: 1Post by: infact_dat
Gtranslate: Error with numberFeb 20, 2019 1:20 amReplies: 1Post by: infact_dat
GTranslate 3.7.4, Joomla 3.9.3 - doGTranslate is not definedFeb 22, 2019 12:34 pmReplies: 1Post by: oase
Add-on gtranslate no longer worksFeb 2, 2019 6:01 amReplies: 1Post by: DarylDixon
Instragram and Gtranslate...!!!!Dec 19, 2018 11:18 amReplies: 1Post by: zackfernandes

Try GTranslate with a free 15 day trial