#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# nginx configuration rules                  [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
#                                                                              #
# This file contains the configuration from the Apaches .htaccess file written #
# for the nginx high performance web server. Put the content of this file into #
# the "server {}" block of your nginx virtual host configuration file. If your #
# blog installation is within a sub directory, you need to adjust this values! #
#                                                                              #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#

#===============================================================================
# Error documents
#===============================================================================
error_page 403 /403.php;
error_page 404 /404.php;

#===============================================================================
# Forbidden directories
#===============================================================================
location ~ ^/(core|template/([^/]+)/(html|lang)/) {
	return 403;
}

#===============================================================================
# Main rules
#===============================================================================
if (!-e $request_filename) {
	rewrite ^(.*)$ /index.php break;
}