[Ubuntu-US-CA] Countdown Image

Darkwing Duck ubuntu at darkwingduck.org
Mon Oct 19 19:33:48 UTC 2009

Okay. What you have to do is setup each image (or file) to mimic each day. 01.* 02.* etc. Then make your .htaccess file and put the following. 

RewriteEngine on
RewriteCond %{TIME_DAY} >1
RewriteRule ^.*countdown\.png$ %{TIME_DAY}.png

Put the .htaccess into the folder where the images are. You do not have make an image for countdown.png as it will auto redirect. The downfall to this method is that you can only use it a month out. But, it works for what we need it to do. 

Now, what I have not tried 'yet' is to make the *.png redirect to a js file. Maybe that will work I don't know. 

Maybe ill try it when I get home and see it it will push a js. Worth a shot. 

------Original Message------
From: Aaditya Bhatia
Sender: aadityabhatia at gmail.com
To: Ubuntu US California
Cc: ubuntu at darkwingduck.org
Subject: Re: [Ubuntu-US-CA] Countdown Image
Sent: Oct 19, 2009 12:15

On Mon, Oct 19, 2009 at 12:06 PM, Darkwing Duck <ubuntu at darkwingduck.org> wrote:
> Unfortunately the way I had to do it was via a .htaccess script so it won't work anywhere else but my server at the moment. It was something I had tossed together. However, I will be doing it for 10.04 a month out. When I get home from work ill share what was in the .htaccess that makes it happen.
> DW

Wow, I couldn't have come up with this simple but perfect hack. I'll
replicate this on my server based on your .htaccess, and we'll
document this process to make it easy for others to adopt and use.
Let's also get that image script (the one I posted) going for future
use, as time permits.


More information about the Ubuntu-us-ca mailing list