Skip to content

Instantly share code, notes, and snippets.

@earth3300
Created August 29, 2018 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save earth3300/624f0ed53769c869c150d706ae1e1edb to your computer and use it in GitHub Desktop.
Save earth3300/624f0ed53769c869c150d706ae1e1edb to your computer and use it in GitHub Desktop.
Time based page display. Shows one or the other file based on seconds in minute.
# Time Based Page Display
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{TIME_SEC} <30
RewriteRule ^index\.html$ page/one.html [L]
RewriteCond %{TIME_SEC} >29
RewriteRule ^index\.html$ page/two.html [L]
</IfModule>
# Shows file one.html the first half of the minute.
# Shows file two.html the second half of the minute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment