Is there any way to set an htaccess or something that redirects, say, "www.site.com/foo.jpg" to "www.site.com/img.php?img=foo"? I'd like to use an auto-image-generator script I've written, but the board it'd be used on doesn't allow image tags with non-image extensions. ![]()
[help] Image Redirects To Script Output?
hm try renaming your .php script to .jpg. does work on some servers.
Alternatively, you could look at mod_rewrite (assuming you're on Apache)...
Originally posted by Stevie BM@May 22 2004, 09:12 AMAlternatively, you could look at mod_rewrite (assuming you're on Apache)...
Excellent, looks like it'll solve this problem and another one for which I'd been using a crude Javascript fix. Thanks! ![]()
Theoretically for IIS6 you only would need to edit the web.config file for the directory in which the behaviour is to be changed, adding something like:
<httpHandlers>
<add verb="*" path="*.png" type="System.Web.UI.PageHandlerFactory" />
</httpHandlers>
However, I've only been able to get this to work by doing the above and adding a custom mapping in the IIS Configuration console (adding the extension .png and sending it to the aspnet_isapi.dll).
This however would be difficult to do in a hosted environment. If anyone has alternatives, suggestions, or expriences on this (that don't include "switch to apache" or the like) I would also like to hear them.
/nudges Stevie....
Well, I'm on Apache, so it doesn't really apply.. ![]()
btw, if anyone wants to see something I cobbled together to test this - http://www.mm3d.wired-hub.net/dynAvs/grad.png ![]()
Aqua-Soft Forums