#
# this file contains some useful options for setting up a Contemplate site
# these options only work if your server uses Apache to serve web pages
# to use this file, upload it to the root directory of your site (not the contemplate directory)
# and add a dot to the beginning of the filename (htaccess -> .htaccess)
#

RewriteEngine on

# rewrite a request for http://www.yourdomain.com/ to http://www.yourdomain.com/main/home.html
RewriteRule ^index.html$ /main/home.html
RewriteRule ^$ /main/home.html

# rewrite URLs that look like regular HTML requests into Contemplate requests
# you can repeat this line for each virtual directory (e.g., main, projects, misc) that you would like to show
RewriteRule ^main/(.+).html$ /contemplate/assembler.php?page=$1&%{QUERY_STRING}
RewriteRule ^projects/(.+).html$ /contemplate/assembler.php?page=$1&%{QUERY_STRING}
RewriteRule ^misc/(.+).html$ /contemplate/assembler.php?page=$1&%{QUERY_STRING}

# use Contemplate pages for the default error pages
ErrorDocument 404 /misc/error_404.html
ErrorDocument 403 /misc/error_403.html
ErrorDocument 401 /misc/error_401.html

# don't allow site visitors to view your pages.txt file
<Files contemplate/config/pages.txt>
	order allow,deny
	deny from all
</Files>
