<Directory /home/site/public_html>
<FilesMatch "\.(gif¦jpe?g¦png¦ico¦css¦js¦swf)$">
Header set Cache-Control "public"
</FilesMatch>
<FilesMatch "\.(ico)$">
Header set Cache-Control "max-age=29030400, public"
</FilesMatch>
# START E-Tag
<ifModule mod_headers.c>
Header unset ETag
</ifModule>
FileETag None
# END E-Tag
# START Deny attempts to view the Htaccess file.
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
# END Deny attempts to view the Htaccess file.
# Start Deny attempts to view the config file.
<Files includes/config.php>
Order allow,deny
Deny from all
</Files>
# End Deny attempts to view the config file.
# START Max Age
<FilesMatch "\.(gif|png|jpg)$">
Header set Cache-Control "max-age=2592000, public"
</FilesMatch>
# END Max Age
# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</ifModule>
# END Cache-Control Headers
# Block User-agent Libwww-perl
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* – [F,L]
RewriteCond %{HTTP_HOST} !^site\.com
RewriteRule (.*) http://site.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^site\.com\/gallery\/
RewriteRule (.*) http://site.com/gallery/$1 [R=301,L]
RewriteRule ^showimage\.php(.*) /gallery/showimage\.php$1 [R=301,L]
RewriteRule ^browseimages\.php(.*) /gallery/browseimages\.php$1 [R=301,L]
RewriteRule ^upload\.php(.*) /gallery/upload\.php$1 [R=301,L]
RewriteRule ^moderate\.php(.*) /gallery/moderate\.php$1 [R=301,L]
RewriteRule ^editimage\.php(.*) /gallery/editimage\.php$1 [R=301,L]
RewriteRule ^managecats\.php(.*) /gallery/managecats\.php$1 [R=301,L]
RewriteRule ^gallery/vbshout\.php(.*) /vbshout\.php$1 [R=301,L]
RewriteRule ^gallery/ckeditor\.php(.*) /ckeditor\.php$1 [R=301,L]
RewriteCond %{REQUEST_URI} !(admincp/|dbseocp/|modcp/|cron|mobiquo|forumrunner|api\.php|reviewpost/|classifieds/|photopost/|gallery/|products/)
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ dbseo.php [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/(admincp|dbseocp|modcp|clientscript|cpstyles|images|reviewpost|classifieds|photopost|gallery|products)/
RewriteRule ^(.+)$ dbseo.php [L,QSA]
</Directory>