RewriteEngine On
RewriteBase /

# Route /{8-char code} to room.php
RewriteRule ^([a-z0-9]{8})/?$ room.php?code=$1 [QSA,L]

# Protect database
<FilesMatch "\.db$">
    Order allow,deny
    Deny from all
</FilesMatch>

# Prevent directory listing
Options -Indexes
