# Set index.n to come before index.php
DirectoryIndex index.n index.php index.html
RewriteEngine On
# Rewrite rules to send Haxe remoting calls on "/" to "haxelib1/". If it matches, that's [L], the last rule - go their immediately.
RewriteBase /
RewriteCond %{HTTP:X-Haxe-Remoting}: 1
RewriteRule ^index.n$ legacy/index.n [L]
# Enable rewrite for the new site's pages, only if the file or dir doesn't exist
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.n/$1 [L]
# Get our stuff gzipped
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript