[TYPO3] RealURL single domain multi-tree (multi-language)

Giannis Economou gecon at di.uoa.gr
Fri Sep 28 14:15:04 CEST 2007


Regarding the problem, I had a trick in mind, that is possible in 
certain setups, but I haven't had the time to look at it, yet.
In theory it could work and seems quite straightforward to me....

It will serve the following:
1. Have realurl in use
2. Have 2 separate trees (2 roots) - one for each language
3. Do not show different subdomain for secondary language (for example 
english). This means, have http://www.example.com/ for the main language 
and http://www.example.com/en/ for the secondary (english in this 
example) language.

The trick is to setup a reverse proxy in Apache to hide the secondary 
domain.
 
This means that you have typo3 running in Apache and also that you are 
able to alter the configuration of apache for the specific domain/web site.
Other web servers could work (with their corresponding modules), too, 
but I have in mind Apache for this.

For details, you can have a look at this page: 
http://www.apachetutor.org/admin/reverseproxies

The main idea is:
- Have available proxy_module and proxy_html_module in Apache.
- Setup a typical reverse proxy for the en.example.com subdomain:
ProxyRequests off
ProxyPass       /en/  http://en.example.com/
ProxyPassReverse /en/ http://en.example.com/
- The above will rewrite all headers. Now rewrite the links:
ProxyHTMLURLMap http://en.example.com /en
<Location /en/>
        ProxyPassReverse /
        SetOutputFilter  proxy-html
        ProxyHTMLURLMap  /      /en/
        ProxyHTMLURLMap  /en  /en
        RequestHeader  unset  Accept-Encoding
</Location>


I repeat that I haven't tried this at all...
In theory this could be an idea on how to hide the subdomain to your 
users (but en.example.com will be in use - it is needed for the realurl 
to work right with 2 roots). If anyone tries that, and have something to 
report (or any ideas why this won't work), I would like to hear the results.


Best regards,
Giannis Economou


Albert van der Veen wrote:
> Hi Giannis,
>
> That's what I thought, thanks. I was planning to look into the code, but 
> don't really have the time at the moment. So probably best to go for the 
> multiple domains like en.domain.com etc.
>
> Albert
>
> Giannis Economou wrote:
>   
>> Hello...
>>
>> I also have tried in the past to do that without separate domains and 
>> have found that there is no way to do this. I remember that I was also 
>> into the php code and it was obvious that this could not happen as it is 
>> now. The reason is that resolutions are based on the "rootpage_id" (the 
>> id of the root/homepage) and in the scenario of 2 languages in 1 domain 
>> you have 2 separate rootpage_ids (one for each language) - 2 trees to 
>> search for pages. If you really need it in one domain, I guess you could 
>> write a new class for handling URLs (like the existing 
>> class.tx_realurl_advanced.php, but one that honors 2 roots) and it will 
>> do it..
>>
>> Best regards,
>> Giannis Economou
>>
>>
>>
>> Albert van der Veen wrote:
>>     
>>> Hi Mathias,
>>>
>>> Thanks, your second option was what I had setup and still have. This 
>>> seemed to work ok, except for results from indexed search. All the 
>>> languages show up in the results as everything is in one tree and no 
>>> L-var is used.
>>>
>>> Your first option is what I had in mind to solve this, but was 
>>> wondering if it can be achived using no separate domains.
>>>
>>> So anyone else for the definitive on this one? :)
>>>   
>>>       
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
>   



More information about the TYPO3-english mailing list