# Turn on the rewrite engine
Options +FollowSymlinks
RewriteEngine on
 
# Request routing
RewriteRule ^([a-zA-Z_-]*)\.(html|json|xml)?$   /vgestion/ws/demo/ws_demo2.php?method=$1&format=$2 [nc,qsa]


# One year for image files
#<filesMatch ".(jpg|jpeg|png|gif|ico)$">
#Header set Cache-Control "max-age=31536000, public"
#</filesMatch>
# One month for css and js
#<filesMatch ".(css|js)$">
#Header set Cache-Control "max-age=86400, public"
#</filesMatch>

#86400

<ifmodule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 1 seconds"
  ExpiresByType text/html "access plus 7200 seconds"
  ExpiresByType image/gif "access plus 518400 seconds"
  ExpiresByType image/jpeg "access plus 518400 seconds"
  ExpiresByType image/png "access plus 518400 seconds"
  ExpiresByType text/css "access plus 0 seconds"
  ExpiresByType text/javascript "access plus 0 seconds"
  ExpiresByType application/x-javascript "access plus 0 seconds"
</ifmodule>

<ifmodule mod_headers.c>
  # Cache specified files for 6 days
  <filesmatch "\.(ico|flv|jpg|jpeg|png|gif|css|swf)$">
  Header set Cache-Control "max-age=518400, public"
  </filesmatch>
  # Cache HTML files for a couple hours
  <filesmatch "\.(html|htm)$">
  Header set Cache-Control "max-age=86400, private, must-revalidate"
  </filesmatch>
  # Cache PDFs for a day
  <filesmatch "\.(pdf)$">
  Header set Cache-Control "max-age=86400, public"
  </filesmatch>
  # Cache Javascripts for 2.5 days
  <filesmatch "\.(js)$">
  Header set Cache-Control "max-age=0, private"
  </filesmatch>
</ifmodule>
