서버 폐쇄시 redirect를 불완전한 html meta태그가 아닌 .htaccess과 php 조합(303)으로 변경

This commit is contained in:
2018-03-03 22:25:56 +09:00
parent d2d2e8e007
commit ebe0f0556c
3 changed files with 16 additions and 9 deletions
+12
View File
@@ -0,0 +1,12 @@
RewriteEngine on
RewriteCond %{ENV:URI} ^$
RewriteRule ^(.*)$ - [ENV=URI:$1]
RewriteCond %{ENV:BASE} ^$
RewriteCond %{ENV:URI}::%{REQUEST_URI} ^(.*)::(.*?)\1$
RewriteRule ^ - [ENV=BASE:%2]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ %{ENV:BASE}maintenance.php [R=303,L,QSA]
-9
View File
@@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv='Refresh' content='0;URL=../'>
</head>
<body></body></html>
+4
View File
@@ -0,0 +1,4 @@
<?php
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Location:..', true, 303);