Answer the question
In order to leave comments, you need to log in
How to exclude images from a rule in .htaccess?
The .htaccess file has the rule
#remove capital letters from links
RewriteCond expr "%{tolower:%{REQUEST_URI}} =~ /(.*)/"
RewriteRule [AZ] %1 [R=301,L]
How to fix it, so that it does not concern images, styles and scripts on the site? Those. if the link is to ABC.js or IMG.css or Qrt.jpg, then the rule would not work.
Answer the question
In order to leave comments, you need to log in
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond expr "%{tolower:%{REQUEST_URI}} =~ /(.*)/"
RewriteRule [A-Z] %1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question