htaccess for static websitesRewriteEngine On RewriteCond %{HTTP_HOST} !^www.domain.co.uk$ [NC] RewriteRule ^(.*)$ http://www.domain.co.uk/$1 [R=301,L]  RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d  RewriteRule (.*) /404.php [R=301,L]  RewriteCond %{THE_REQUEST} ^.*/index.php RewriteRule ^(.*)index.php$ http://www.domain.co.uk/$1 [R=301,L]  ErrorDocument 404 /404.php ExpiresActive On ExpiresDefault "access plus 7200 seconds"  #AddType x-mapp-php5 .php #AddHandler x-mapp-php5 .php  # BEGIN GZIP <ifmodule mod_deflate.c> AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript </ifmodule> # END GZIP  ### Add support for SVG Graphics and CSS3 Pie AddType image/svg+xml svg svgz AddEncoding gzip svgz AddType text/x-component .htc  <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$"> Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT" Header unset ETag FileETag None </FilesMatch>  ### Creare's Leverage Browser Caching <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 1 week" ExpiresByType image/jpeg "access plus 1 week" ExpiresByType image/gif "access plus 1 week" ExpiresByType image/png "access plus 1 week" ExpiresByType text/css "access plus 1 week" ExpiresByType application/pdf "access plus 1 month" ExpiresByType text/x-javascript "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresDefault "access plus 2 days" </IfModule>  <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/xhtml text/html text/plain text/xml text/javascript application/x-javascript text/css BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary Header append Vary User-Agent env=!dont-vary </IfModule>  ### File Compression AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/x-javascript