Skip to content

Instantly share code, notes, and snippets.

@cronfy
Forked from donnykurnia/.htaccess
Last active December 7, 2025 08:57
Show Gist options
  • Select an option

  • Save cronfy/6e6344406c7cfeca00b0192b05fbef18 to your computer and use it in GitHub Desktop.

Select an option

Save cronfy/6e6344406c7cfeca00b0192b05fbef18 to your computer and use it in GitHub Desktop.
.htaccess 503 Техническое обслуживание сайта (maintenance page)
AddDefaultCharset utf-8
ErrorDocument 503 /maintenance.html
RewriteEngine On
RewriteBase /
# uncomment and set your ip to allow your ip to enter
#RewriteCond %{REMOTE_ADDR} !1\.2\.3\.4
# block requests to site, but allow let's encypt generation
RewriteCond %{REQUEST_URI} !well-known
# allow maintenance page itself
RewriteCond %{REQUEST_FILENAME} !maintenance.html
# show 503 for every request
RewriteRule .* /maintenance.html [R=503,L]
@cronfy
Copy link
Copy Markdown
Author

cronfy commented Feb 10, 2017

Также смотри maintenance.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment