Eric Butera wrote:
On 5/18/06, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
I had to do something similar to keep a javascript file from being
cached by an aol proxy.  Heres a simple example that you could change
to suit your needs by changing the js to something like image.php and
making it send image headers and outputting the contents of your file.

1) Rewrite rule in httpd.conf or virtual.conf
=======================================================================
RewriteRule ^/lib/(.*)/test.js.php /lib/test.js.php [QSA,L]


2) Create test.js.php in /lib/test.js.php
=======================================================================
<?php
header('Content-Type: text/javascript');
?>


3) Access url: http://example.local/lib/4908574987/test.js.php.  You
can create your url like /lib/time()/test.js.php.

This way you don't have to worry about creating and deleting files.

There's no need to use mod_rewrite for this. You'll get the same result if you us a url like

$url = '/lib/test.js.php?'.time();

It's a nail, use a hammer not the screwdriver.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to