Elxis CMS Forum

Support => Technical support => Topic started by: marcin on July 24, 2007, 16:07:29

Title: national domain redirecting to ?mylang=xxx
Post by: marcin on July 24, 2007, 16:07:29
Hello,
i have two domains attached to the root of my www account where also the Elxis is installed. The first domain is something.com and the second is something.pl

I use SEF URLs and have enabled .htaccess file I've received with my Elxis instalation.

My Elxis multilingual configuration uses the english language as default.
Is there any possibility to attach something.pl domain to index.php?mylang=polish   ??? to ensure serving polish content as default for polish visitors?

Thanks in advance
Title: Re: national domain redirecting to ?mylang=xxx
Post by: datahell on July 24, 2007, 19:05:17
Redirect from something.pl to something.com/index.php?mylang=polish

.htaccess at something.pl:

Redirect permanent / http://www.something.com/index.php?mylang=polish

or

Redirect 301 / http://www.something.com/index.php?mylang=polish


Title: Re: national domain redirecting to ?mylang=xxx
Post by: marcin on July 25, 2007, 08:18:50
Datahell, thanks a lot!

You, Elxis team guys still surprising me! What a quick answer!

I've checked the solution you've described above and i decided to use it at my website temporarly. I've made a new folder in my root, pointed the language-specific domain to it and put into it the .htaccess file in the way you had written.
It works fine. www.something.pl is redirected to www.something.com with the language parameter.
But this kind of solution causes that address line presented in the browser is now "something.com" instead of "something.pl" wchich was the address entered into the browser.

Previously I was also considering this kind of solution and have read apache documentation to learn more o about mod_alias and mod_rewrite abilities of HTTP servers.

And, as I know, the 301 redirect is intended to tell the agent that content previously served at redirected-from.url is now permanently moved to redirected-to.url. Thats also the way search engines understanding the 301 redirect.

In our case it means that there is no more any separate sites something.pl or something.ru and their content was moved to something.com. It's not exactly true because, thanks to Elxis, national sites have completely different structure and content. It's also goes without saying that it is not a good situation from SEO approach.

I have thought about setting the ful-window HTML frames at indexes of particular domains and loading the Elxis into this kind of wrappers, but I skipped because this isn't a good practice, as I know also bad from SEO approach and finally, I didn't sure if Elxis engine have any "_top" tagret parameters inside.

Actually I've thought initially about something a little bit smarter. Something to ensure separation of national content into the national domains. I skipped "the google option" which, as I think, detects geographical location of the users and automatically redirecting them from google.com to google.pl with polish language as default.

I thought about a kind of engine used by european division of Oki corporation for example.
I don't know how it is operated, from HTTP server or from the website scripts but it works very nice.

There is a www.okiprintingsolutions.co.uk, www.okiprintingsolutions.se, ww.okiprintingsolutions.pl, www.okiprintingsolutions.ru and many more.

These sites are driven by one database, one http server and one administration panel, just like Elxis does. I'm 200% sure. But if you enter particular address into the browser, it would not changed into "main oki" during browsing.

Do you know how to achieve this?

BTW, oki sites have <html lang=> parameter set different for particular country. Is this possible with Elxis?
Title: Re: national domain redirecting to ?mylang=xxx
Post by: datahell on July 25, 2007, 09:53:26
These kind of redirects are quite easy but now you confused me. I thought you wanted a permanent redirect, if not just remove the "permanent" option. I did not understood what exactly you want to do. It is also easy to implement automatic redirect based on user's language. For that you must make some modifications to index.php and/or to includes/Core/language.php

As for the lang parameter make the following change to your template's index.php file:

from this:
<html xmlns="http://www.w3.org/1999/xhtml">

to this:

<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo _LANGUAGE; ?>" xml:lang="<?php echo _LANGUAGE; ?>">

Elxis 2008 has a totally new seo (SEO pro) wiith automatic meta tags and perfect urls. Just wait about 2-2,5 months...
Title: Re: national domain redirecting to ?mylang=xxx
Post by: marcin on July 25, 2007, 10:05:53
Wow,
Nice to hear news about Elxis 2008, that will be great!
Thanks for the language advice I will use it!

You are "pushed me into the books" with this redirect things. I decided to learn more about it and let you know what  kind of solution I choose.

Thanks, thanks,
you are very nice and helpful.