Ton Verhagen wrote:
Dear All,I am using a .com domain (e.g. www.mydomain.com) with default locale set to en_US.The catalog running on this domain can be accessed by: www.mydomain.com/cgi-bin/shop . The DirectoryIndex for this domain has been set to: /cgi-bin/shop/index.htmlNow I would like to access this catalog from different domains while setting thelocale for those domains at first entry. E.g.www.mydomain.de ----> www.mydomain.com/cgi-bin/shop/process/locale/de_DE/page/index.html www.mydomain.fr ----> www.mydomain.com/cgi-bin/shop/process/locale/fr_FR/page/index.htmlThus accessing e.g. www.mydomain.de should set the de_DE locale on the main domain.I tried the following in Apache's virtual host section for the '.de' and '.fr' domains:Redirect / http://www.trendy-jewels.com/tj/eshop/process/locale/de_DE/page/index.htmlor RewriteEngine OnRewriteRule ^/(.*) http://www.domain.com/cgi-bin/shop/process/locale/de_DE/page/index.html [p]Both settings do redirect the user from e.g. www.mydomain.de to the main domain www.mydomain.comhowever, the locale will not be set.When I past the redirect URL in my browser, the locale will be set to the one provided in the URL.Any ideas what I might be missing here?
You could also do the locale initializations in Autoload, example
from http://www.materialboerse.de/:
# check if we enter from an English or a German site
# and set locale accordingly
unless ($Scratch->{locale_initialized}) {
$Scratch->{locale_initialized} = 1;
my $locale = 'de_DE';
my $vhost = $Tag->env('VIRTUAL_HOST') || $Tag->env('SERVER_NAME');
for (split (/\s/, $Variable->{ENGLISH_SITES})) {
if ($_ eq $vhost) {
# need English
$locale = 'en_US';
$Config->{VendURL} = "http://${vhost}$Variable->{CGI_URL}";
last;
}
}
$Tag->setlocale({locale=>$locale,persist=>1});
}
Regards
Racke
--
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.