2

I added the following code to the localconf.php:

$TYPO3_CONF_VARS['BE']['adminOnly'] = '2';
$TYPO3_CONF_VARS['FE']['pageUnavailable_force'] = '1';
$TYPO3_CONF_VARS['FE']['pageUnavailable_handling'] = 'http://www.somedomain.com/maintenance';
$TYPO3_CONF_VARS['FE']['pageUnavailable_handling_statheader'] = 'HTTP/1.0 503 Service Temporarily Unavailable';
$TYPO3_CONF_VARS['SYS']['devIPmask'] = '127.0.0.1,::1,1.2.3.4';

1.2.3.4 is my IP address. http://www.somedomain.com/maintenance is on another webserver (not the webserver where the TYPO3 installation is). I get the following message Moved Permanently - The document has moved here. How do I make the correct redirect? I tried to put a html-file on the webserver where the TYPO3 installation is, but than I get

Oops, an error occured!

Reason: This page is temporarily unavailable.

Additionally, http://www.domain.com/maintenance.html was not found while trying to retrieve the error document.

What I'm doing wrong?

testing
  • 19,681
  • 50
  • 236
  • 417

2 Answers2

1

The value in pageUnavailable_handling will be fetched by TYPO3, parse and then returned to the browser. Thus if you want to point to another server, then you either have to send a 30x header and do a redirect inside the HTML document or you have to setup a redirect rule within .htaccess. I would do the later.

pgampe
  • 4,531
  • 1
  • 20
  • 31
0

REDIRECT should solve your problem.

$TYPO3_CONF_VARS['FE']['pageUnavailable_handling'] = 'REDIRECT:http://www.somedomain.com/maintenance';

Other options are READFILE for static html pages or USER_FUNCTION for, well user functions ;-)

Ludwig
  • 3,580
  • 2
  • 20
  • 24