How do I get Apache to show a different page on a certain date?

You can use mod_rewrite, with a TIME condition, to tell Apache to load a different page based on the date.

This redirects /r to /before_r until 8/27/2016 at 9:51pm, then to /after_r afterwards.

<IfModule mod_rewrite.c>
RewriteCond %{TIME} <20160827215100
RewriteRule ^r$ /before_r [NC,R=301,L]
RewriteCond %{TIME} >20160827215100
RewriteRule ^r$ /after_r [NC,R=301,L]
</IfModule>
Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Twitter
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • StumbleUpon