Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!