johndoe31415/pyradium

Add option to include secret key in .htaccess

Closed this issue · 0 comments

When we have an autogenerated .htaccess, we might want to make a presentation available for some people beforehand who know a secret key. This can be achieved using mod_rewrite:

RewriteCond %{QUERY_STRING} ^secret$
RewriteRule ^ - [CO=access-key:secret:%{HTTP_HOST}] [L]

RewriteCond %{TIME} <20230525084500
RewriteCond %{QUERY_STRING} !^secret$
RewriteCond %{HTTP_COOKIE} !access-key=secret

RewriteRule ^ /not_available_yet.html [R=307]

Make this possible automatically from within pyradium.