[TYPO3-core] Status of RFC: #9046: Nested domain linking with domain record on root page
Ernesto Baschny [cron IT]
ernst at cron-it.de
Wed Oct 7 20:40:39 CEST 2009
Hi Ingmar,
thanks for the quick response!
Ingmar Schlecht schrieb:
>> So I find the bug in the patch is there that we use HTTP_HOST to decide
>> if we should prepend another domain to the URL or not.
> The problem is that it sometimes does depend on the current HTTP_HOST,
> what link is rendered, e.g. whether a domain is prefixed or not.
>
> Say we have a tree like this:
>
> yahoo.com
> - finance (no special subdomain, accessible only through yahoo.com)
> - weather (weather.yahoo.com, no force flag set)
> * europe
> * asia
> - sports (sports.yahoo.com, force flag set)
> * soccer
> * tennis
>
> Now say you are on the european weather page using
> yahoo.com/europe.XYZ.0.html, and want to link to the finance page: You
> wouldn't have to prefix any domain, because you are already on yahoo.com.
But you can prefix it with the domain without doing any harm. So that
the europe-page is always the same in the cache, no matter how you
access it (yahoo.com/europe.XYZ.0.html,
weather.yahoo.com/europe.XYZ.0.html). Links pointing to some page that
doesn't share our own sys_domain get the prefix, the ones that share our
sys_domain (in this case the weather-start-page, europe and asia) get
relative links.
> If you would instead use the weather.yahoo.com domain to access the
> european weather page, the same link to finance would not work unless
> you do explicitly prefix the domain yahoo.com.
Yes, which would be the case if you always prefix it instead of only if
it doesn't match HTTP_HOST. I don't see the need to make different
cached copies of the page to cope with that.
> So the very same page (the european weather page) would exist in two
> possible ways, each of which needs to be cached separately.
>
> The only way around this would be always assuming the force flag to be
> set, so we always assume and always make sure, that a domain is always
> prefixed and we are on the closest domain to the current page. But that
> way we would loose a lot of flexibility.
True, but I really don't see many people using not "forcing" a domain,
as this will give penalities in Google (SEO), because you are providing
the same content through different URLs. So this cannot be the
recommended behaviour anyway.
>> We should simply
>> match the PID of the sys_domain record used for the destination page
>> link with the sys_domain records PID from the current page. If they are
>> the same, the link is "relative". To decide that we don't even need to
>> consider the users HTTP_HOST (which only decides which page to render).
> You have to keep in mind that one page can be accessed through different
> domains.
I already did that, and I think that we only need to differenciate it
like I explained above so that we always get the same page in the cache
no matter how it was accessed.
Cheers,
Ernesto
More information about the TYPO3-team-core
mailing list