Ok, here's the conundrum I'm faced with, I have a site that only allows access from specific referrers, they connect to the site and are pushed to a folder with their account number (all the content is symlinked to somewhere else).
Using PHP and sessions, I can only protect .php/.html files, but not movies, images etc (which ARE subject to direct linking).
I am using output buffering to rewrite those links to a wrapper file, then turned off direct access to those files via the Apache directive FilesMatch, this worked in an unexpected manner. The files were protected, however some of them (such as .asf or .swf) somtimes have their own code to redirect to a relative URL... this is bad when using a wrapper.
So I am trying to figure out how to AddType .htaccess files so I can dynamically generate them, I know it's possible with mod_perl from some examples I have seen, but I have never seen PHP used as an interpreter for .htaccess files. The question is:
1) is it possible?
2) how do I make .htaccess parse-able (I know how to do AddType, but Apache seems to be completely ignoring it, even when used in the srm.conf file
3) Examples would really be great
I would really appreciate any insight anyone has with this, I've been pulling my hair out on what seemed like a simple script for the past couple of weeks now (trying different approaches and ideas).
Thanks,
Stephen VanDyke