masterexploder / PHPThumb

PHP Thumbnail & Image Manipulation Library
http://phpthumb.gxdlabs.com
980 stars 264 forks source link

phpthumb & htaccess #77

Closed flashflavour closed 11 years ago

flashflavour commented 11 years ago

Hi there,

if i have an image (/uploads/image.jpg), and i have a script (/phpthumb/phpThumb.php) that resizes the image and shows it (not saving!).

I print the image like this:

<img src="/phpthumb/phpThumb.php?src=../uploads/image.jpg&w=100&h=100" alt="" />

Is it possible to change it to this (with a directory 'thumbs' that doesn't exist):

<img src="/thumbs/image.jpg?w=100&h=100" alt="" />

And rewrite the url with htaccess (i tried the code below, but no luck):

RewriteRule ^thumbs/(.*).(jpg|gif|png)\?(.*)$ /phpthumb/phpThumb.php?src=../uploads/$1.$2&$3 [L]

Thanks in advance

nettles-jarrod commented 11 years ago

Sorry, but this is not really an issue with PHPThumb, and is outside the scope of the project. I would suggest posting your question on www.stackoverflow.com, where it would be better suited. Good luck with your project!