Feature #11747
openMaintenance Page with Redirect
0%
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
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>
- Install google Chrome extension "ModHeader" https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj/related?hl=en
- configure http header in modHeader extension with name X-Maintenance and value X4XD1CLM1zI7QzPeeWbn
- The page should now be accessible from your browser but not from elsewhere
Updated by Marc Egger over 3 years ago
- Related to Support #11741: upgrade Typo3 9.5.22 (forkred) added
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.
Updated by Carsten Rose almost 3 years ago
- Tracker changed from Support to Feature