PDA

View Full Version : Make atrack images have image extensions


]cibyr[
07-10-04, 21:55
Please refer to http://www.phpbb.com/phpBB/viewtopic.php?p=1271300

Could you do it Hwulex? Pretty please?

Paul
07-10-04, 22:23
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)

Hwulex
08-10-04, 08:25
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)

kopite
08-10-04, 08:41
Thats a poor excuse mate. do it at work ;)

Hwulex
08-10-04, 08:45
Yeah, I blatantly will in a bit. ;) :- :p

]cibyr[
09-10-04, 02:22
Done yet? (or are you leaving it till next week...)

Hwulex
09-10-04, 20:42
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.

]cibyr[
10-10-04, 02:16
Damm. Any chance of the rename-to-png-and-force-it-to-be-parsed-as-php method?

Paul
10-10-04, 09:37
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

]cibyr[
10-10-04, 09:59
Hrmm, I'll see if my friend would mine me using his hosting (I doubt he would). Thanks.

[edit] w00t, it works :D