Options All -Indexes

DirectoryIndex index.shtml ez.html ez.php
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .? http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule   ^topic/([^/]+) /ez.php?t=$1 [NC]
RewriteRule   ^story/([^/]+) /ez.php?t=$1 [NC]
RewriteRule   ^news/([^/]+) /ez.php?t=$1 [NC]
RewriteRule   ^(.{3})(.*)~t$ upload/press/t~/$1/$1$2
RewriteRule   ^tt~(.{3})(.*)$ upload/press/t~/$1/$1$2
RewriteRule   ^([0-9]+)$ ez.php?t=$1 [L]
RewriteRule   ^t~(.*)$ ez.php?t=$1
RewriteRule   ^mt~(.*)$ m.php?t=$1
RewriteRule   ^mc~(.*)$ m.php?c=$1
RewriteRule   ^(.*)-prsn$ ez.php?prsn=$1
RewriteRule   ^i~(.*)$ ez.php?i=$1
RewriteRule   ^a~(.*)$ ez.php?a=$1
RewriteRule   ^c~(.*)$ ez.php?c=$1
RewriteRule   ^c-(.*)$ ez.php?c=$1
RewriteRule   ^c~(.*)P(.*)$ ez.php?c=$1&P=$2
RewriteRule   ^C~(.*)$ ajx.php?c=$1
RewriteRule   ^T~(.*)$ ajx.php?t=$1
RewriteRule   ^A~(.*)$ ajx.php?a=$1
RewriteRule   ^H~(.*)$ ajx.php?H=$1
RewriteRule   ^z~(.*)$ ez.php?z=$1
RewriteRule   ^Z~(.*)$ ajx.php?z=$1
RewriteRule   ^PRSN~(.*)$ ajx.php?prsn=$1
RewriteRule   ^@(.*)$ ajx.php?@=$1
RewriteRule   ^([^\.]+)$ $1.html [NC,L]
RewriteRule   ^addt inx/web/z/~addpress.php
RewriteRule   ^img/(.*) upload/press/X/$1
RewriteRule   ^amp/(.*) upload/press/AMP/$1
RewriteRule   ^amp_(.*)$ ajx.php?~=amp&amp=$1
RewriteRule   robots.txt inx/lib/robots.txt
RewriteRule   gplus inc/fn/out.php?out=gplus
RewriteRule   app inc/fn/out.php?out=app
RewriteRule   sitemap.xml rss/sitemap.xml
RewriteRule   rss.xml rss/rss.xml
RewriteRule   favicon.ico inc/favicon.ico
ErrorDocument 404 /inx/lib/404.php
Redirect /madd /inx/web/z/~addpress.php
Redirect /email /inx/lib/phpmailer/mail.php
Redirect /zmail /inx/lib/phpmailer/zmail.php
Redirect /gmail /inx/lib/phpmailer/gmail.php
Redirect /webmail http://webmail.%{HTTP_HOST}
Redirect /cpanel http://cpanel.%{HTTP_HOST}
AddCharset UTF-8 .xml .json .html .php
ExpiresActive On
ExpiresByType image/gif "access plus 90 days"
ExpiresByType image/jpeg "access plus 90 days"
ExpiresByType image/png "access plus 90 days"
ExpiresByType text/css "access  1 month"
ExpiresByType text/js "access plus 90 days" 
ExpiresByType application/x-shockwave-flash "access plus 90 days"
ExpiresByType application/x-javascript  "access plus 90 days"
ExpiresByType text/html "access plus 1 month 15 days 2 hours"

Header unset Pragma
FileETag None
Header unset ETag

<FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf|pdf|flv|mp3)$">
<IfModule mod_expires.c>
	ExpiresActive on
	ExpiresDefault "access plus 90 days"
	Header set Cache-Control "public"
</IfModule>
</FilesMatch>
<FilesMatch "\.(html|htm|xml|txt|xsl)$">
	Header set Cache-Control "max-age=60, no-cache"
</FilesMatch>
<IfModule mod_mime.c>
	AddType application/x-javascript .js
	AddType 'text/css; charset=UTF-8' css
	AddType image/vnd.microsoft.icon .cur .ico
</IfModule>
<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE text/html text/css text/javascript image/png image/jpeg application/x-javascript text/x-component text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/javascript
	<IfModule mod_setenvif.c>
		BrowserMatch ^Mozilla/4 gzip-only-text/html
		BrowserMatch ^Mozilla/4\.0[678] no-gzip
		BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
	</IfModule>
	<IfModule mod_headers.c>
		Header append Vary User-Agent env=!dont-vary
	</IfModule>
</IfModule>
