|
Posted by Brendan Gillatt on 10/26/07 14:51
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Kevin Blount wrote:
> I'm trying to create the forum favorite dynamic sig image, that's
> realy PHP script. I've had moderate success with .php files but when I
> change the extension to .png I'm prompted to download the file, rather
> than it rendering.
>
> My understanding is that this is not supposed to happen, and that by
> adding an.htaccess file I can force .png files to be compiled/parsed/
> whatevered by PHP. In my .htaccess file I have:
>
> AddType application/x-httpd-php .png
>
> Any advice?
>
> I'm using heliohost.org as my host, and they basically pointed me to
> create the above file (as the first reply to my recent support query).
> Googling this I'm not seeing that I'm doing anything wrong.. so what
> gives?
>
I agree with the second poster - I don't think you can change the types
with .htaccess. You could try using mod_rewrite to direct everything from
, say, "/image-12345.png" to "image.php?id=12345". I'm not great with
regular expressions but I'm sure someone else can help you out with that.
- --
Brendan Gillatt
brendan {at} brendangillatt {dot} co {dot} uk
http://www.brendangillatt.co.uk
PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
iD8DBQFHIf8FkA9dCbrNdDMRAj/RAJ4sTogymJHcE9q+u8qNVKohnCWwIgCg2pJk
kA8IGylIajuEVPq2oB5JQSE=
=Brkz
-----END PGP SIGNATURE-----
[Back to original message]
|