[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 555
  • Last Modified:

.htaccess file

is it correct to write a .htaccess file like this?

I use litespeed and linux server. My pages are mainly html.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

<FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif)$">
  Header set Cache-Control "max-age=864000, public, must-revalidate"
  Header unset Last-Modified
</FilesMatch>
0
Braveheartli
Asked:
Braveheartli
  • 2
  • 2
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
0
 
BraveheartliMarketingAuthor Commented:
What happens when i use above code? It only calls old pictures from cashe, right? If the picture name is the same, it calls it from cache, right? When i use a new name for a picture they will see the new image because it is not in the cashe. It will call it from the server. Am i right?
0
 
Dave BaldwinFixer of ProblemsCommented:
That is what is supposed to happen.
0
 
BraveheartliMarketingAuthor Commented:
thank you
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now