Talked to some photo guys that run Gallery 2.
He said you should be able to go to the admin page for gallery and configure the rewrite rules to end in .jpg
Site Admin -> Url Rewrite -> Setup tab
I would start here for more info on how to do it:
http://codex.gallery2.org/Gallery2:Modu ... 281.1.x.29
Should be pretty easy to figure it out on your end. The Forum software just won't do it the way you have your rewrite rules set up.
here is an example of what it should look like if you change the rewrite rules:
http://www.teoh.us/main.php/v/macro/pt_ ... 9.jpg.html
the url for the pic on that page is:
http://www.teoh.us/main.php/d/11835-5/p ... 17_059.jpg