RewriteEngine On # Redirect robertbellamy.com to www.robertbellamy.com RewriteCond %{HTTP_HOST} ^robertbellamy\.com$ [NC] RewriteRule ^(.*)$ https://www.robertbellamy.com/$1 [R=301,L] # Ensure www.robertbellamy.com properly loads from the CNAME destination RewriteCond %{HTTP_HOST} ^www\.robertbellamy\.com$ [NC] RewriteCond %{REQUEST_URI} !^/\.well-known/ RewriteRule ^(.*)$ "https://subdomain.cargocollective.com/$1" [P] # Block direct image hotlinking except from allowed domains RewriteCond %{HTTP_REFERER} !^https?://(www\.)?(robertbellamy|asrtrax|cargo)\.com [NC] RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC] # PHP Handler (Ensure compatibility) AddHandler application/x-httpd-ea-php74 .php .php7 .phtml