Project

General

Profile

Actions

Bug #22626

closed

Domain records should be configurable / not rely only on $_SERVER["HTTP_HOST"]

Added by Sacha Vorbeck almost 14 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-05-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

short description:
Domain records use the global variable $_SERVER["HTTP_HOST"] to find out which content to deliver in a TYPO3 multi-domain installation.

But in some hosting setups using proxies, the HTTP headers are manipulated by a proxy and this is why it would be useful to have an additional field in domain records where one could enter an additional domain name/alias that should activate the domain record.

detailed description:
I have to use TYPO3 in a hosting-setup where a proxy-server manipulates the HTTP request and so the request that reaches the TYPO3-server doesn`t contain the HTTP_HOST the user originally requested.

Example:
1. user requests: http://subsite.mysite.de/
2. DNS resolves subsite.mysite.de.de to a proxy-server
3. Proxy manipulates the request and sends it to the TYPO3-Server
3. The manipulated request reaches the TYPO3 server and $_SERVER["HTTP_HOST"] contains subsite.prod.liveserver.de
4. Apache name based virtual host sends request for subsite.prod.liveserver.de to the TYPO3 installation
5. TYPO3 generates page
6. generated page is sent back to proxy->user

To make TYPO3 deliver the right content, I configure the following things:

Set the right baseURL with a condition like this:
[globalString = ENV:HTTP_HOST=subsite.prod.liveserver.de]
config.baseURL = http://subsite.mysite.de/
[global]

set ID of sub-sites start page in RealURL config:
$TYPO3_CONF_VARS['EXTCONF']['realurl']['subsite.mysite.de'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['subsite.mysite.de']['pagePath']['rootpage_id'] = 192;
$TYPO3_CONF_VARS['EXTCONF']['realurl']['subsite.prod.liveserver.de'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['subsite.prod.liveserver.de']['pagePath']['rootpage_id'] = 192;

Add two domain records to the start page of the sub-site:
subsite.mysite.de
subsite.prod.liveserver.de

Now the right page is rendered with the right base URL but TYPO3 still thinks it`s handling subsite.prod.liveserver.de and not subsite.mysite.de. This results in RealURL not working and all realtive, local typolinks are considered as pointing to an external site.

So what I need would be an additional field in domain records where one could enter an additional domain name/alias that should activate the domain record.

Of course you could say I should set $_SERVER["HTTP_HOST"] to the right value on the proxy/server side but I still think it would be good if you could do this in the domain records as well as not all TYPO3 admins have access to the server/proxy.

(issue imported from #M14355)

Actions #1

Updated by Alexander Opitz almost 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.3

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #2

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback for over 90 days.

Actions

Also available in: Atom PDF