acreloaded/ms/master/ms/.htaccess - Htaccess File


ErrorDocument 403 "403 You don't have clearance"
ErrorDocument 404 "404 I lost it!"
ErrorDocument 500 "500 Stupid failure"

# Set some PHP options
php_value display_errors 1
php_value error_reporting -1
php_value expose_php 0

RewriteEngine On
RewriteBase /ms

# Master-Server v1.3 endpoints
RewriteRule ^([crav])$ ms_$1.php [L]

# Legacy v1.2 endpoints
# client handles
RewriteRule ^cube ms_c.php [L]

# server handles
RewriteRule ^reg/(d+)/(d{1,5})/(d+)$ ms_r.php?v=$1&p=$2&guid32=$3 [L]
RewriteRule ^reg/(d+)/(d{1,5})$ ms_r.php?v=$1&p=$2 [L]
RewriteRule ^con/(d{1,5})/([d.]+)/(d+)/(d+)/(d+)$ ms_a.php?p=$1&a=::ffff:$2&guid32=$3&i=$4&u=$5&legacy [L]
RewriteRule ^con/(d{1,5})/([d.]+)/(d+)$ ms_a.php?p=$1&a=::ffff:$2&guid32=$3 [L]
RewriteRule ^ver/(d{1,5})/(d+)/([da-f]+)$ ms_v.php?p=$1&i=$2&a=$3&legacy [L]
RewriteRule ^register server_update.txt [L] # phase-out old <= 2.5.x servers

# Extra endpoints
RewriteRule ^bans$ extra_bans.php [L]
RewriteRule ^api/([a-zA-Z]+)/([$A-Za-z_][0-9A-Za-z_]*)/?$ extra_query.php?q=$1&c=$2 [L,QSA]
RewriteRule ^api/([a-zA-Z]+)/?$ extra_query.php?q=$1 [L,QSA]

On Github License


Download PDF of Htaccess file