# ==========================================================================
#  RELOOKZ — PREVIEW ONLY        autodrivers.in/r/
#
#  REPLACE THIS FILE when the site moves to relookz.com.
#  The noindex block below is what keeps the preview out of Google. If it
#  travels to the live domain, the real site will never rank. Use the
#  supplied htaccess-LIVE.txt instead at that point.
# ==========================================================================

# --- Keep the preview out of search engines -------------------------------
#  robots.txt CANNOT do this job here. robots.txt is only read at the domain
#  root, so a robots.txt sitting inside /r/ is ignored completely. A header
#  is the only thing that works from a subfolder.
<IfModule mod_headers.c>
  Header set X-Robots-Tag "noindex, nofollow, noarchive, nosnippet"
</IfModule>

# --- MIME types the server may not already know ---------------------------
#  Without text/vtt the video captions are served as plain text and the
#  track silently fails - the player shows no CC option and nobody notices.
AddType text/vtt          .vtt
AddType image/svg+xml     .svg
AddType video/mp4         .mp4

# --- Force HTTPS --- TEMPORARILY OFF -------------------------------------
#  autodrivers.in has no SSL certificate yet (Namecheap AutoSSL runs on its
#  own overnight schedule and the manual button is disabled on shared
#  hosting). Forcing HTTPS with no certificate gives every visitor a full
#  page security warning, which is worse than plain http for a preview.
#  PUT THIS BACK the moment the certificate is issued - just delete the
#  four # marks below.
#
# <IfModule mod_rewrite.c>
#   RewriteEngine On
#   RewriteCond %{HTTPS} !=on
#   RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# </IfModule>

# --- Compression ----------------------------------------------------------
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css text/plain text/vtt
  AddOutputFilterByType DEFLATE application/javascript image/svg+xml
</IfModule>

# --- Caching --------------------------------------------------------------
#  HTML is deliberately NOT cached, so when you re-upload a page during
#  review the owner sees the change immediately instead of a stale copy.
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/html              "access plus 0 seconds"
  ExpiresByType text/css               "access plus 7 days"
  ExpiresByType application/javascript "access plus 7 days"
  ExpiresByType image/jpeg             "access plus 30 days"
  ExpiresByType image/png              "access plus 30 days"
  ExpiresByType image/svg+xml          "access plus 30 days"
  ExpiresByType video/mp4              "access plus 30 days"
</IfModule>

# --- Tidy -----------------------------------------------------------------
Options -Indexes
