Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Chung Leong
August 7, 2004, 4:37 pm
rate this thread
In the configuration page of our CMS there is place where the administrator
would specify the directory where uploaded audio files will be stored. The
page currently does not work as fully as I would like. After a change the
audio files are not web-accessible until httpd.conf is updated to map URLs
to the new folder (and an Apache restart).
In my httpd.conf there's a line that looks like the following:
RewriteRule ^/audio/(.*) C:/Audio/$1
So it seems if I can somehow make the "C:/Audio" part a variable that can be
modified by PHP, my problem would be solved.
P.S. Don't suggest using readfile(), fpassthru(), etc.
Re: How to control Apache URL to filename translation via PHP?
You can configure Apache to use an external program as a filter for
rewrite rules; a PHP command-line script could probably do the job.
-- brion vibber (brion @ pobox.com)
- » I can't see my Web site from Internet Explorer because I use LINUX!!!!!!!!!!!!!!!!
- — Previous thread in » PHP Scripting Forum