A zašto ne probaš onda ovako da staviš?
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]
<IfModule mod_headers.c>
<FilesMatch "\.(js|xml|html|gz|)$">
Header append Vary Accept-Encoding
</FilesMatch>
</IfModule>
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|swf|mp3)$">
Header set Cache-Control "max-age=990304000, public"
</FilesMatch>
<FilesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=841728, public, must-revalidate"
</FilesMatch>
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=432000, must-revalidate"
</FilesMatch>
Pod uslovom da su ti fajlovi i gzipovani, naravno.
ob_start( 'ob_gzhandler' );
Makneš dakle ekstenzije slika koje treba da se maknu iz htaccess fajla, i max-age podesiš po tvome.
+ Ono što sam ti ispisao staviš pre html outputa u php-u..
about:networking