Hi, I have some links problem and I'm trying to solve the problem using htaccess.
I have a directory that contain images, for example:
PGPHX.203.jpg
PGPHX.80.jpg
PGPHX.137.jpg
...
I want that all the links that doesn't contain a *.number.jpg at the end to be pointed to *.203.jpg, for example:
FROM: PGPHX.jpg TO: PGPHX.203.jpg
38.108.97.145/content/memberAvatars/2/QBqz6/PGPHX.jpg
http://38.108.97.145/content/memberAvatars/2/QBqz6/PGPHX.203.jpg
Just to make it clear, I have those ruls in the htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\.78\.jpg$ $1\.80\.jpg [L] #size 78 no longer exists, redirect to 80
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\.230\.jpg$ $1\.203\.jpg [L] #size 230 no longer exists, redirect to 203
RewriteRule defaultAvatar\.(png|jpg) defaultAvatar\.203\.jpg [L] #any defaultAvatar with no size, redirect to jpg
RewriteRule defaultAvatar\.(\d{1,3})\.png defaultAvatar\.$1\.jpg [L] #redirect any default avatar png, to jpg.
Thanks for the help, Eldad.