Project

General

Profile

Actions

Feature #11747

open

Maintenance Page with Redirect

Added by Marc Egger over 3 years ago. Updated almost 3 years ago.

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

0%

Estimated time:
Discuss:
Prio Planung:
Vote:

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
Actions #1

Updated by Marc Egger over 3 years 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
Actions #2

Updated by Marc Egger about 3 years ago

Actions #3

Updated by Marc Egger about 3 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Marc Egger about 3 years 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.

Actions #5

Updated by Carsten Rose almost 3 years ago

  • Tracker changed from Support to Feature
Actions

Also available in: Atom PDF