I've a directory outside the webroot with images, css and javascripts.
These files often change.
I could write a script which locates the file, figures out the mime type and outputs it to the browser.
Or
i could locate the file, copy it to a webaccessable directory and redirect to that file using header location. When the file is requested again, there first will be a check if the file is modified, and again a redirect.
What would be a better performance wise? Every request a readfile, or every request a timestamp check and redirect ( so 2 requests instead of one )