server automatically changes the case of files extensions
Posted
by
AlanChavez
on Stack Overflow
See other posts from Stack Overflow
or by AlanChavez
Published on 2012-08-29T17:37:50Z
Indexed on
2012/08/29
21:38 UTC
Read the original article
Hit count: 194
.htaccess
I have the following problem, if I upload any file to my web server it automatically renames the file to an uppercase extension. For instance: If I upload picture.jpg my server automatically changes it to picture.JPG
If I use <img src="picture.jpg">
my server returns a 404 error but if I use <img src="picture.JPG">
then the server displays the image.
Can the .htaccess solve this issue? something with RewriteRule and RewriteCond?
RewriteCond %{HTTP_HOST} ^$\.jpg [NC]
RewriteRule ^(.*)$ $1\.JPG [R=301,L]
Any help will be greatly appreciated! Thanks!
© Stack Overflow or respective owner