Answer the question
In order to leave comments, you need to log in
How to set the response code - 200 OK to the MODx site stub?
Good afternoon!
The site is currently under maintenance, it became necessary to make a stub for MODx Revo.
Set in the settings - Site status (site-status) to No, set up your template and page for the stub. The stub is displayed on the site.
But, for some reason, if you check the status of the site through the Webmaster, it gives out - HTTP status code 503 Service Unavailable
And it is necessary that this stub be indexed and available to the PS.
Can you tell me how to set this setting?
Thank you!
Answer the question
In order to leave comments, you need to log in
As an option, a simple plugin for the OnHandleRequest event
<?php
$res_id = 1; // заменить на свой id заглушки
$uri = $modx->makeUrl($res_id, '', '', 'abs');
if ($modx->user->hasSessionContext('mgr') || $modx->user->isMember('Administrator')) return;
if($_SERVER['REQUEST_URI'] == $uri || $_SERVER['REQUEST_URI'] == MODX_MANAGER_URL) return;
$modx->sendRedirect( $uri );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question