So let me clarify for myself (and others information, I guess). Apache webserver needs to have mod_rewrite installed to effectively handle the requests, but I can just use PHP to rewrite the URLs via the $_SERVER suprglobal, like this:<pre> $_SERVER[] <?php print_r($_SERVER); ?> </pre>I will handle static file requests via the database and a record ID, whichultimately returns the correct URL to the file to my application andredirects in order to download the file. Am I on the right track? I'm sure Ijust said something that is wrong.
What exactly are you trying to do? Writing a download script and crafting URLs that will feed that script?
So, something like this? http://example.com/download/234234 …with "234234" being the ID of the file to download in the database? If yes, then I would recommend this: 1. install mod_rewrite on your server 2. enable .htaccess override in httpd.conf 3. create an .htaccess file in your web root4. add rewrite rules in in .htaccess that translate "http://example.com/download/234234 " into "http://example.com/download.php?id=234234"
5. create a script called "download.php" and put it in web root6. in download.php, pull the ID of the requested download out of the URL with $_GET['id'] and then query the database for the file name and path
7. proceed with your download script to pass the appropriate headers to the browser so that the file downloads
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
