Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


What can be the reason for the images not showing? And what can I do to make them work?

% curl
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>

% curl -I
HTTP/1.1 302 Found

% curl -I
HTTP/1.1 200 OK

The service provider is MediaTemple and the server uses Apache

share|improve this question
What webserver are you using? – mgorven May 18 '12 at 19:03
I'm running Apache – Lisandro Vaccaro May 18 '12 at 19:11
up vote 2 down vote accepted

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
share|improve this answer

Apache is using file extension to determine file type and associate corresponding mime-type to Content-Type header.

You can also use SetHandler image/jpeg in .htaccess to force all file in this directory to be represented as image.

share|improve this answer
I don't understand, if Apache was determining the correct file type correctly wouldn't it show the images? That seems like a good solution. I created an .htaccess file on the /thumbs directory with only SetHandler image/jpeg as content but images are still not displayed. Was that what I was supposed to do? – Lisandro Vaccaro May 18 '12 at 19:54
Your server answers to request with 302 redirect to The problem is not with file extension. – DukeLion May 18 '12 at 20:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.