Hi Pascal,
Not bad 😉. I tested it on my test website with the current 2.6.12. Here’s my test procedure and the results:
- Verified that my admin email works 😀
- Turned off HTProtect’s automatic monitoring (so I don’t get locked out in an emergency and can manually overwrite the .htaccess)
- Activated Emergency Shutdown
- Copied the secret site URL into a text editor (in case the email doesn’t arrive)
- Checked email (emergency mode activated – your access link worked) 😀
- Navigated to the website frontend
This message appeared:
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.
ERROR: The content of /htp-maintenance.html is not being interpreted 😒
- Diff between the new .htaccess of the test site and the .htaccess of the official site
ERROR: Language of the official site’s .htaccess changed (was English before, now German) – probably due to an issue with one of the recent automated HTProtect updates on the official site 😒
In the test site’s .htaccess, section 0 was added at the start. At its end is the directive:
ErrorDocument 503 /htp-maintenance.html
ERROR: This HTML file obviously isn’t used. I myself add a different ErrorDocument directive later in the Custom Rules end, but that’s also not used (probably because it doesn’t call a fixed HTML file) 😒
Suggestion 1: Either the "ErrorDocument 503 ..." directive should be moved to the very end of the emergency .htaccess, or all Custom Rules should be removed. I’m also wondering if we even need any other sections of the .htaccess in emergency mode besides section 0? Maybe everything after that can be left out?
Suggestion 2: It would be great to make /htp-maintenance.html configurable in advance (so you can enter your own HTML code).
- Admin log-out and log-in without closing the browser (without deleting cookies) works. 😀
- Admin log-out, close browser (delete cookies), log-in doesn’t work as intended. 😀
- Access via the secret URL
WARNING: This URL only takes you to the frontend, not the backend. To get to the backend, you have to open the backend URL afterwards without closing the browser (without deleting cookies). 😒
Suggestion: This should be clearly documented so people don’t feel like they’re “locked out.”
- Generating a new link works (new email, log-out, close browser, log-in, 503 message, secret link works) 😀
- Exiting emergency mode works 😀
- Log-out, close browser, log-in works for both frontend and backend 😀
- Turned automatic monitoring back on
Thanks for your effort. I hope this helps clear the last hurdles.
Cheers
Tom