General Community > Scripting Help
Trick browser to...
morph:
How to trick the browser to thinking a PHP scripted avatar is a jpg IMG or gif or what ever, you get the idea. Only reason I need this is because I am using a php avatar but vB won't let me use anything but jpg or gif... Any help would be great.. TIA!
morph
Tyris:
you could probably rename the file... and then do something it htaccess to make your server treat just that jpg (or gif) as a php file... I dunno... could work ^_^
Chris Cromer:
If you use apache, and have htaccess enabled, then use this:
--- Code: ---RewriteEngine on
RewriteRule image.gif(.*) index.php$1
--- End code ---
Just change image.gif to the name you want the gif to be, and index.php to the name of your php script. Save it as ".htaccess" then upload it to your host.
Note: don't create an image.gif file, this code requires the file to not exist.
Aquilo:
here is an all all around version I have to be able to access any gd/php script in the directory
--- Code: ---RewriteEngine on
RewriteRule ^(.*).gif$ $1.php
--- End code ---
[Unknown]:
Sending the proper Content-Type is also crucial.
-[Unknown]
Navigation
[0] Message Index
[#] Next page
Go to full version