View Full Version : Make atrack images have image extensions
Please refer to http://www.phpbb.com/phpBB/viewtopic.php?p=1271300
Could you do it Hwulex? Pretty please?
Incase w00 is too lazy to lookup the rewrite rule:
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/image/([a-z0-9]*).png
RewriteRule ^(.*) /atrack.php?id=%1 [L]Should work :\
So http://atrack.xaprief.com/image/<username>.png would bring up the image
(presuming mod_rewrite is installed on the atrack box)
Ooh, that's a good idea. :D
I'm at work now, then shoot off to MAnchester for the weekend, so if someone can remind me to do this beginning of next week, that's be grand. (y)
Thats a poor excuse mate. do it at work ;)
Yeah, I blatantly will in a bit. ;) :- :p
Done yet? (or are you leaving it till next week...)
I did actually do it, but it didn't work. :(
The server it's on is the old VDS that the forums used to be hosted on, and it's useless.
Damm. Any chance of the rename-to-png-and-force-it-to-be-parsed-as-php method?
I'm not sure how phpBB filters images, but if he renamed the php script to a .png, it'd still have the username variable after it: /atrack.png?id=hello which I know vBulletin dosen't allow* (if it's enabled in the acp), I'd imagine phpBB would be the same (it'd be pretty stupid if it wasn't - but then a lot of thing about phpBB are pretty stupid)
* see (this is actually in image tags if you quote this message and look): http://forums.xaprief.com/verdect/buttons/reply_small.gif?test=does_this_work
Edit:
]cibyr[ - do you have your own hosting and domain? if you do, you could use the re-write method yourself, just add this to a .htaccess file at the public root of your domain:
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/atrack.png
RewriteRule ^(.*) http://atrack.xaprief.com/atrack.php?id=YOUR_USERNAME [L]
(changing the your_username part)
Then you can get your atrack image at http://yourdomain.tld/atrack.png
Hrmm, I'll see if my friend would mine me using his hosting (I doubt he would). Thanks.
[edit] w00t, it works :D
vBulletin v3.5.1, Copyright ©2000-2010, Jelsoft Enterprises Ltd.