Project

General

Profile

Feature #11747

Maintenance Page with Redirect

Added by Marc Egger 12 months ago. Updated 7 months ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Start date:
16.12.2020
Due date:
% Done:

0%

Estimated time:
Discuss:

Description

Create Simple maintenance page for the upgrade of forkred/production instance.

Find a way to redirect all but our requests to a maintenance page.

Solution1:
Use apache htaccess with mod_rewrite to rewrite all requests if they have a special directory. otherwise make redirect

Research:

apache - htaccess redirect all pages to single page - Stack Overflow
https://stackoverflow.com/questions/3522921/htaccess-redirect-all-pages-to-single-page

Simple HTML Maintenance Page for Apache using rewrite_module · GitHub
https://gist.github.com/jdeathe/206919260c8bd7e8b609471be9486ada


Files


Related issues

Related to QFQ - Support #11741: upgrade Typo3 9.5.22 (forkred)ClosedMarc Egger15.12.2020

Actions
#1

Updated by Marc Egger 12 months ago

Solution:

  • Add the following lines to Typo3 .htaccess above comment "Rules to set ApplicationContext based on hostname"
    ######### Mainenance ##########
    #

    ErrorDocument 503 /%{ENV:CWD}maintenance.html        
    RewriteCond "%{HTTP:X-Maintenance}" "!^X4XD1CLM1zI7QzPeeWbn" 
    RewriteCond "%{ENV:REDIRECT_STATUS}" !=503

    # Uncomment this line to activate maintenance mode
    # RewriteRule ".*" "-" [R=503,L]

    #
    ###### End Maintenance #######
  • Add maintenance.html in the same directory as .htaccess with the following content:
<!DOCTYPE html>
<html>
    <head>
        <title>Maintenance</title>
        <style>
            body{color:#666;background-color:#f1f1f1;font-family:sans-serif;margin:12%;max-width:50%;}
            h1,h2{color:#333;font-size:4rem;font-weight:400;text-transform:uppercase;}
            h2{color:#333;font-size:2rem;}
            p{font-size:1.5rem;}
        </style>
    </head>
    <body>
        <h1>503</h1>
        <h2>Temporarily Offline</h2>
        <p>This site is currently closed for maintenance. Please check back again soon.</p>
    </body>
</html>

  • The page should now be accessible from your browser but not from elsewhere
#2

Updated by Marc Egger 10 months ago

#3

Updated by Marc Egger 10 months ago

  • Status changed from New to In Progress
#4

Updated by Marc Egger 9 months ago

  • Status changed from In Progress to New
  • Assignee changed from Marc Egger to Carsten Rose

In diesem Ticket habe ich beschrieben wie man mit .htaccess eine Maintanance page anzeigen kann.

soll ich dies noch an einem andern ort dokumentieren?

gehört nicht wirklich zu QFQ. eher zu web administration.

#5

Updated by Carsten Rose 7 months ago

  • Tracker changed from Support to Feature

Also available in: Atom PDF