https://www.icyphoenix.com/viewtopic.php?f=26&t=1119&p=8726#p8726
-----------------------------------
Artie
Mon 12 Feb, 2007 21:05

Re: Rewrite Jpg Url-s In Album
-----------------------------------
That's basicly the same as this (from mg.com) ... and should work

[quote user="PaulW" post="8721"]Just posted on smartor's site...  just a way of maybe including it as a new BBCode field or something for users to copy & then use in other forums (ones which dont allow .php extensions as image url links) and only allow IMG tags to use .JPG .GIF or whatever...

**PROBLEM ONLY**

I have this configured only for .JPG file uploads, so for things like .GIF and .PNG WONT work at all!  unless there is another workaround for that, I'm sorry!  I suppose you could add more lines to the rewrite code to allow .gif and .png extensions for the same, and then modify a script for the bbcode display to detect filetype & show relevant url??  i dont know

Via the .htaccess file, I am doing testing this now on my webasite, and it seems to work!

If you haven't already created a .htaccess file, do so in the ROOT of your forums...

then add this

[code linenumbers=false]
   RewriteEngine On  
   RewriteBase /  
   RewriteRule ^album_pic_([0-9]*).jpg album_pic.php?pic_id=$1 [L,NC] [/code]



RewriteBase is the location of where the forum is, so if it is /phpbb then it should be /phpbb (i think)

I'm still new to the whole .htaccess idea, but it does work! [/quote]


