Solved

.htaccess file

Posted on 2013-01-23
4
545 Views
Last Modified: 2013-01-24
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
Comment
Question by:Braveheartli
  • 2
  • 2
4 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 38811270
0
 
LVL 1

Author Comment

by:Braveheartli
ID: 38812115
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
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38812193
That is what is supposed to happen.
0
 
LVL 1

Author Closing Comment

by:Braveheartli
ID: 38813980
thank you
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question