custsrvcrep
08-09-2005, 08:05 PM
Hi - I remember reading that there was a method using apache to test for the day of the month and then specify WHICH index page to use until the next test (the next day).
In other words -- apache test the day/date of the month.
The test returns 09 (for today's date - day #9; as in August 9)
So index09.htm becomes the day's index page.
Does anyone remember how this actually works and is implemented? I searched on the net and couldn't find anything either.
Thanks.
kailash
08-10-2005, 01:26 AM
hm, dont actually remember anything like that. But you want alternative methods?
custsrvcrep
08-10-2005, 10:53 AM
Hi,
Sure - I would be happy to see other methods. I know that years ago we used cgi scripting to do this and it worked ok. I'm still looking for my notes that I wrote.
When you get time --- how do you suggest?
Thank you.
kailash
08-10-2005, 02:05 PM
Here's the simplest trick.
Make your index file, index.php . And I assume you want DAY.html files to be rotated (01.html, 02.html ... 31.html). If thats so, the index.php would contain this
<?php
include date("d").".html";
?>
Isnt it simple? ;)
custsrvcrep
11-26-2005, 11:25 PM
TO: kailash
Remember this thread? I finally found my notes (while NOT looking for them!). Here is what I had written down. I'm curious as to what you think about this method.
Create 31 pages one for each day of the month and name them 01.html, 02.html ... 30.html, 31.html Now whenever index.html is hit, the page of the day will be loaded instead. This is a quick and easy way to load a fresh FPA each day without much maintenance.
RewriteEngine on
RewriteCond %{TIME_DAY} >1
RewriteRule ^.*index\.html$ %{TIME_DAY}.html
kailash
11-27-2005, 05:08 AM
That should work, provided you have mod_rewrite ofcourse.