how to use .jpg instead of .php
i hear we have to use .htaccess file.. any idea?
e.g this...
<a href="http://www.nbfun.net/image" target="_blank"><img src="http://nbfun.net/image.gif?uid=11219363 ... +TEXT+HERE" alt="www.nbfun.net"></a>

Moderators: onion2k, General Moderators

Code: Select all
AddType application/x-httpd-php .php .jpg
or silently redirect using mod_rewrite to a PHP file:
[code=.htaccess]Options +FollowSymLinks +Indexes
RewriteEngine on
RewriteBase /
RewriteRule ^image.([^.]+)\.jpg$ image.php?text=$1 [L]
that last snippet cleans up the request to turn [b]image.123.jpg[/b] into [b]image.php?text=123[/b]. The benefit of that is browsers will cache the image and save you some overhead. Also, it looks nicer IMO and is easier to remember / say / type.