Options +FollowSymLinks
RewriteEngine On
RewriteBase /

#-- Forbid any php executes
#RewriteCond %{THE_REQUEST} ^.+?\ [^?]+\.php[?\ ]
#RewriteRule \.php$ - [F]
#--------------------------

#--
RewriteRule ^(.*)Cptch\.html$ /cms/Cptch.php
RewriteRule ^(.*)dl\.html$ /cms/dl.php
RewriteRule ^([^/]*)/([^/]*)/([^/]*)\.html$ /cms/index.php?x=$1&y=$2&z=$3
RewriteRule index\.html$ /cms/index.php
#------------------------------

#-- Remove infinite loop
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]
# -----------------------------

ErrorDocument 401 default