Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

189
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda