Apache experts - assistance please

Ok, basically we have a simple system on our site where our forum members can upload images & then use the standard [ img ] tags to display them in their posts.

We already have htaccess setup in our upload dir to prevent hotlinking from outside our domain, but I'm wondering is if there is something else we can do with that hotlinking traffic.

What I'd like to do is to have a direct link (img.domain.com/picture.jpg) automagically turn into domain.com/view.php?p=picture.jpg

If they are using the [ img ] tags on our forums I want the images to display in their posts like normal, but if they either post the image link without the [img ] tags, or if they post that link elsewhere outside of our domain, I'd like to have the picture be viewed in a new page that we create that will just include the hotlinked image.

Ok that was way too wordy for what I'm trying to accomplish but I hope someone can make some sense out of it. Apache experts - assistance please

I said "Apache experts" because I assume this would be controlled via htaccess, but I'm open to other methods as well.

Any help will be much appreciated.

 

 

 

 

Top