# Charbonnel et Walker — Gift Finder prototype
# Recognition Design & Marketing Limited
#
# This file is optional. If the server returns a 500 error after
# uploading, delete it — the prototype works perfectly well without.

# --- Keep this out of search results -------------------------------
<IfModule mod_headers.c>
  Header set X-Robots-Tag "noindex, nofollow, noarchive"
</IfModule>

# --- Serve index.html for the bare folder URL ----------------------
DirectoryIndex index.html

# --- Stop the folder being listed if index.html is ever missing -----
Options -Indexes

# --- Compression, if available -------------------------------------
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript
</IfModule>

# --- Don't cache the prototype, so revisions show immediately -------
<IfModule mod_headers.c>
  <FilesMatch "\.html$">
    Header set Cache-Control "no-cache, must-revalidate"
  </FilesMatch>
</IfModule>

# --- Hide this file from the web ------------------------------------
<Files ".htaccess">
  Require all denied
</Files>

# --- Password protection --------------------------------------------
# Easiest route is cPanel > Directory Privacy, which writes the
# correct paths for you. If you would rather do it by hand, uncomment
# the four lines below and set the AuthUserFile path to a .htpasswd
# file stored ABOVE public_html.
#
# AuthType Basic
# AuthName "Prototype — please sign in"
# AuthUserFile /home/YOURACCOUNT/.htpasswd
# Require valid-user
