I have a dynamic image script that shows user info on an image using this tag
<img src="http://domain.com/dynamicimage.php" />
Any way to change the .PHP
to .PNG
using .hatccess ?
I have a dynamic image script that shows user info on an image using this tag
<img src="http://domain.com/dynamicimage.php" />
Any way to change the .PHP
to .PNG
using .hatccess ?
You don't need to update the .htaccess for this. If you don't mind the .php extension in the src attribute, you simple make sure the php script generates the correct header for the png content. For example:
header('Content-Length: '.strlen($imgesrcstring));
header('Content-Type: image/png');
If you do mind the .php extension, you will need to put something into .htaccess for rewrite settings so that any request to dynamicimage.png is handled by dynamicimage.php
In that case please have a look at this question: