個人的には IP で行っているため、サイトをオフラインにすることはできますが、完全にアクセスできます (新しい機能をテストし、元に戻す前に機能することを確認するため)。
RewriteEngine on
# For maintenance:
# If your IP address is 1.1.1.1 - then dont re-write
RewriteCond %{REMOTE_ADDR} !^1\.1\.1\.1
# If the person is requesting the maintenance page, also dont rewrite (prevent loops)
RewriteCond %{REQUEST_URI} !/maintenance.html$
# Otherwise rewrite all requests to the maintenance page
RewriteRule $ /maintenance.html [R=302,L]
# do not rewrite links to the documentation, assets and public files
RewriteCond $1 !^(assets)
# do not rewrite for php files in the document root, robots.txt or the maintenance page
RewriteCond $1 !^([^\..]+\.php|robots\.txt|maintenance\.html)
# but rewrite everything else
RewriteRule ^(.*)$ index.php/$1 [L]
!^1.1.1.1 を現在の IP に変更するだけです。すなわち!^121.65.56.65
自分の IP がわからない場合は、「what is my IP」とグーグルで検索すると、最初のヒットとして表示されます。
しかし、あなたの特定の質問に関しては、これはうまくいくはずです:
RewriteCond %{REQUEST_URI} !/admin$
RewriteRule $ /index_failsafe.php [R=302,L]
編集: