Reputation: 67
i have been trying to get work a htaccess rule for the below but i cannot figure it out.
/theimages/100/150/IMAGE-FOLDER-image.jpg
should read from :
/phpThumb/phpThumb.php?src=IMAGE/FOLDER/image.jpg&ae=1&w=100&h=150
any help appreciated thanks
Upvotes: 1
Views: 47
Reputation: 784888
You can use this code in your DOCUMENT_ROOT/.htaccess
file:
RewriteEngine On
RewriteBase /
RewriteRule ^theimages/([^/]+)/?$ phpThumb/phpThumb.php?src=$1 [L,NC,QSA]
RewriteRule ^theimages/(\d+)/(\d+)/([^-]+)-([^-]+)-([^-.]+\.jpg)$ phpThumb/phpThumb.php?src=$3/$4/$5&ae=1&w=$1&h=$2 [L,NC,QSA]
Upvotes: 2