.htaccess - ModRewrite: Excepting images from lower case URL's -
when decided change url's lower case, didn't think links images. discovered url's no longer display because picture.jpg defaults picture.jpg, doesn't match in images folder.
so have 2 choices: 1) rename images or 2) add code .htaccess file exempts images lower case rule.
on top of that, have rules default underscores dashes - , many of images use underscores.
these rules i'm working right now:
rewriterule (.*?[a-z]+.*) /${tolower:$1} [r] rewriterule ^([^_]*)_([^_]*_.*) $1-$2 [n] rewriterule ^([^_]*)_([^_]*)$ /$1-$2 [l,r=301]
i'm going wind modifying them somehow, want replace spaces dashes. plus, several people have told me these rewriterules improved.
but know of rewriterule allow images (and folders reside in) display @ url's matching regular values? in other words, if have image @ mysite/images/world/spain.png, should display @ url, not mysite/images/world/spain.png.
or best bite bullet , rename images? thanks.
Comments
Post a Comment