Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

188
Vistas
Apache - set application MIME type based on URL or directory

I have some images in my content whose url look like

http://www.example.com/sites/default/files/cdn/2014/10/08/w3V7WGRjaj5FUXx6wM5LIA4eyfmmB0grX0cIvPw2qf-O1mhQ2qwYPEHddAeVer62LLkZFrEV7fSQCxSR-J_CjPxncwLfbmjkdKNE_Gt1eENqMD5ikc9Bwl-NhSdePmjn2g

These are image files, with no extension.

They render as images on my webhost.

I moved to a different server, and currently when the same url is opened, the browser offers the image as text file for download.

I believe the application/mime type is not being set to image by the new apache server.

i tried adding a htaccess snippet as

<Directory "sites/default/cdn/*">
 Header append Vary: Accept-Encoding
    AddType image/png .png
</Directory>

And also tried several other combinations like giving a specific directory instead of a *, etc. But no luck so far.

Any pointers?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda