note 12873 deleted from function.header by jimw
| From: | jimw@php.net | Date: | Wed, 31 Oct 2001 22:02:32 +0000 |
| Subject: | note 12873 deleted from function.header by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19779@lists.php.net to get a copy of this message | ||
Not using header(), but a fair way to get the browser to know the right filename is to make it the
tail of the URL. This was kind of mentioned above, but the way I've been doing it is to return
pictures from a script serve-pic.php, but have the URL something like:
http://host/gallery-images/foo/some-real-file-name.png
'foo' is the identifier that gets passed to the script using rewrite:
RewriteRule ^/gallery-images/([^/]+)/(.*)$ serve-pic.php?id=$1&req_name=$2
mod_rewrite is grand, it lets you keep URLs much more sane, and more related to what you're
sending, rather than how you are processing the request.