I just moved to a new server. All my site is including images without extensions. () but the new server doesn’t seem to recognize this files unless I add each file’s extension which I don’t know so I need it to work without the extension.
Example: http://lujanventas.com/test.php
What can be the reason for the images not showing? And what can I do to make them work?
% curl http://lujanventas.com/test.php
<html>
<body>
No extension:</br>
<img class="itemImage" src="/uploads/thumbs/619-0"></br>
With extension:</br>
<img class="itemImage" src="/uploads/thumbs/619-0.jpg"></br>
</body>
</html>% curl -I http://lujanventas.com/uploads/thumbs/619-0
HTTP/1.1 302 Found
Location: http://www.lujanventas.com/404.php% curl -I http://lujanventas.com/uploads/thumbs/619-0.jpg
HTTP/1.1 200 OK
The service provider is MediaTemple and the server uses Apache
You want to enable MultiViews content negotiation, which makes Apache select an appropriate representation of a resource. The following directive in .htaccess
or an appropriate <Directory>
, <Location>
or <Files>
section should do that.
Options MultiViews
Check more discussion of this question.