Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6788925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:32:34+00:00 2026-05-26T17:32:34+00:00

We have a multisite CMS that handles images and other files like this.. How

  • 0

We have a multisite CMS that handles images and other files like this..

How can we cache images and other files that are in www.(or non-www.)variable-domain.com/files/* with .htaccess?

This is causing a 500 error. I stripped out some.. here is what I have currently that works (minus the Directory and contents part – it throws the error when thats included).

#
#   Force Browser Cache
#
<ifmodule mod_expires.c>
ExpiresActive On

<filesmatch "\.(jpg|gif|png|css|js)$">
    ExpiresDefault "access plus 1 year"
</filesmatch>

<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf)$">
    Header set Cache-Control "max-age=2592000"
</FilesMatch>

<FilesMatch ".(js|css|pdf|txt)$">
    Header set Cache-Control "max-age=604800"
</FilesMatch>

<Directory "/home/aiwebsystems/public_html/uploads">
    <FilesMatch "\.(gif|jpg|png|js|css)$">
        ExpiresDefault "access plus 1 year"
    </FilesMatch>
</Directory>

</ifmodule>

I would need all subdirectories of this included too…

Thanks for the help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:32:35+00:00Added an answer on May 26, 2026 at 5:32 pm

    Being as it does not have an extension, none of this worked. I change the code in the end and it works great now, using the file name rather than the image ID as the last URI parameter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's suppose that we have multi-site CMS and every website in this CMS having
I have a codeigniter multistie install where I have such code that I can
This is a multi-site problem. I have a lot of sites with .htaccess files
I have a MultiLine asp:Textbox (a standard html textarea for those non-asp people) that
Let's say I have some multiline text that I'd like to format, and let's
I have setup a wordpress multisite blog that is load balanced over 5 servers
I have this site which uses multisite manager for minisites. The issue i am
I have to develop multisite application with single sign on across domains (something like
I need to model a postal address that can have multiline street address, the
I have a multisite Drupal based magazine sites and I would like to know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.