I have two folders:
^cache/
^cache/resized/
with all my images saved.
Now if these rules are TRUE:
RewriteRule ^images/([^/]+)(_[0-9]+)(x+)([0-9]+)(\.(gif|jpg|jpeg|png))$ img.php?img=$1&ext=$5&size=$2&type=c&height=$4&con=e [L]
RewriteRule ^images/([^/]+)(_[s|w]+)(_[0-9]+)(\.(gif|jpg|jpeg|png))$ img.php?img=$1&ext=$4&size=$3&type=$2&height=0&con=i [L]
the script "img.php" resizes the original image (the $1 parameter) and saves it under ^cache/resized/
Now, I don't want the images to be resized each time that those rules are TRUE, but just the FIRST TIME, so I would check if the resized images already exist under ^cache/resized/, and use them without calling "img.php".
Could you help please?
^cache/
^cache/resized/
with all my images saved.
Now if these rules are TRUE:
RewriteRule ^images/([^/]+)(_[0-9]+)(x+)([0-9]+)(\.(gif|jpg|jpeg|png))$ img.php?img=$1&ext=$5&size=$2&type=c&height=$4&con=e [L]
RewriteRule ^images/([^/]+)(_[s|w]+)(_[0-9]+)(\.(gif|jpg|jpeg|png))$ img.php?img=$1&ext=$4&size=$3&type=$2&height=0&con=i [L]
the script "img.php" resizes the original image (the $1 parameter) and saves it under ^cache/resized/
Now, I don't want the images to be resized each time that those rules are TRUE, but just the FIRST TIME, so I would check if the resized images already exist under ^cache/resized/, and use them without calling "img.php".
Could you help please?
Last edited:








