IT業界の技術をメモ・情報公開できる

メンテ画面 htaccess

登録日:2023-04-14   
Apache @ms

https://webtan.impress.co.jp/e/2009/06/16/5880

ErrorDocument 503 /maintenance.html

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !=/maintenance.html
RewriteCond %{REMOTE_ADDR} !=192.168.0.4
RewriteCond %{REMOTE_ADDR} !=192.168.0.5
RewriteRule ^.*$ - [R=503,L]
</IfModule>


https://kantaro-cgi.com/blog/web-server/htaccess_maintenance_mode.html
<IfModule mod_rewrite.c>
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !\.(css|jpe?g|gif|png|js)$
RewriteCond %{REQUEST_URI} !^ment.html$
RewriteRule ^.*$ ment.html [L]
</IfModule>

一覧に戻る