Last active 11 hours ago
Simple .htaccess Alternative to Basic Auth
0
0
1
| 1 | RewriteEngine On |
| 2 | |
| 3 | RewriteCond %{QUERY_STRING} !^access_key=my-password$ [NC] |
| 4 | RewriteCond %{HTTP_COOKIE} !access_key=my-password |
| 5 | RewriteRule ^ - [R=511,L] |
| 6 | |
| 7 | Header set Set-Cookie "access_key=my-password; path=/; Max-Age=3600; HttpOnly; Secure; SameSite=Strict" |