# BEGIN POWERED CACHE
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType  text/html                       "access plus 0 seconds"
    ExpiresByType  text/richtext                   "access plus 0 seconds"
    ExpiresByType  text/plain                      "access plus 0 seconds"
    ExpiresByType  text/xsd                        "access plus 0 seconds"
    ExpiresByType  text/xsl                        "access plus 0 seconds"
    ExpiresByType  text/xml                        "access plus 0 seconds"
    ExpiresByType  application/xml                 "access plus 0 seconds"
    ExpiresByType  application/json                "access plus 0 seconds"
    ExpiresByType  text/cache-manifest             "access plus 0 seconds"
    ExpiresByType  text/css                        "access plus 1 year"
    ExpiresByType  application/javascript          "access plus 1 year"
    ExpiresByType  image/jpeg                      "access plus 6 months"
    ExpiresByType  image/gif                       "access plus 6 months"
    ExpiresByType  image/png                       "access plus 6 months"
    ExpiresByType  image/bmp                       "access plus 6 months"
    ExpiresByType  image/tiff                      "access plus 6 months"
    ExpiresByType  image/webp                      "access plus 6 months"
    ExpiresByType  image/heic                      "access plus 6 months"
    ExpiresByType  image/svg+xml                   "access plus 4 month"
    ExpiresByType  font/ttf                        "access plus 4 month"
    ExpiresByType  font/woff                       "access plus 4 month"
    ExpiresByType  font/woff2                      "access plus 4 month"
    ExpiresByType  font/otf                        "access plus 4 month"
    ExpiresByType  application/vnd.ms-fontobject   "access plus 4 month"
    ExpiresByType  image/x-icon                    "access plus 1 week"
    ExpiresByType  application/atom+xml            "access plus 1 hour"
    ExpiresByType  application/rss+xml             "access plus 1 hour"
</IfModule>
<IfModule filter_module>
  <IfModule version.c>
    <IfVersion >= 2.4>
      FilterDeclare   COMPRESS
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'application/atom+xml'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'application/javascript'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'application/json'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'application/ld+json'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'application/manifest+json'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'application/rss+xml'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'application/vnd.ms-fontobject'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'application/xhtml+xml'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'application/xml'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'font/opentype'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'image/svg+xml'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'image/x-icon'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'text/html'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'text/plain'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'text/x-component'"
      FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'text/xml'"
      FilterChain     COMPRESS
      FilterProtocol  COMPRESS  DEFLATE change=yes;byteranges=no
    </IfVersion>
  </IfModule>
</IfModule>
<IfModule mod_deflate.c>
  SetOutputFilter DEFLATE
  <IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
      SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
      RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
    </IfModule>
  </IfModule>
  <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE application/atom+xml \
		                          application/javascript \
		                          application/json \
		                          application/ld+json \
		                          application/manifest+json \
		                          application/rss+xml \
		                          application/vnd.ms-fontobject \
		                          application/x-font-ttf \
		                          application/xhtml+xml \
		                          application/xml \
		                          font/opentype \
		                          image/svg+xml \
		                          image/x-icon \
		                          text/html \
		                          text/plain \
		                          text/css \
		                          text/x-component \
		                          text/xml
  </IfModule>
  <IfModule mod_headers.c>
    Header append Vary: Accept-Encoding
  </IfModule>
</IfModule>

<IfModule mod_headers.c>
Header unset ETag
</IfModule>
FileETag None

<FilesMatch "\.(html|htm|html\.gz|rtf|rtx|txt|xsd|xsl|xml)$">
  <IfModule mod_headers.c>
    Header set X-Powered-By "Powered Cache"
    Header unset Pragma
    Header append Cache-Control "public"
  </IfModule>
</FilesMatch>
<IfModule mod_mime.c>
    AddType text/html .html.gz
    AddEncoding gzip .gz
</IfModule>
<IfModule mod_setenvif.c>
    SetEnvIfNoCase Request_URI \.html.gz$ no-gzip
</IfModule>
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /video/
    AddDefaultCharset UTF-8 
    RewriteCond %{HTTPS} on [OR]
    RewriteCond %{SERVER_PORT} ^443$ [OR]
    RewriteCond %{HTTP:X-Forwarded-Proto} https
    RewriteRule .* - [E=PC_SSL:-https]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteRule .* - [E=PC_ENC:.gz]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =""
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{HTTP_USER_AGENT} !^(facebookexternalhit).* [NC]
    RewriteCond %{HTTP:Cookie} !(wp-postpass|wordpressuser_|wordpresspass_|wordpress_sec_|wordpress_logged_in_|powered_cache_commented_posts|comment_author_|comment_author_email_|comment_author_url_) [NC]
    RewriteCond %{HTTP_USER_AGENT} !^(facebookexternalhit).* [NC]
    RewriteCond "%{DOCUMENT_ROOT}/video/wp-content/cache/powered-cache/%{HTTP_HOST}%{REQUEST_URI}/index%{ENV:PC_SSL}.html%{ENV:PC_ENC}" -f
    RewriteRule .* "/video/wp-content/cache/powered-cache/%{HTTP_HOST}%{REQUEST_URI}/index%{ENV:PC_SSL}.html%{ENV:PC_ENC}" [L]
    # prevent mod_deflate double gzip
    RewriteRule \.html\.gz$ - [T=text/html,E=no-gzip:1]
</IfModule>
# END POWERED CACHE
<IfModule mod_headers.c>
   Header set Connection keep-alive
</IfModule>

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /video/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /video/index.php [L]
</IfModule>

# END WordPress