Daily Lucky Numbers:
5
12
17
25
32
46

Hosting ROM games from another site

Started by Chen Zhen, January 31, 2026, 09:10:47 PM

Previous topic - Next topic

Chen Zhen

Use this code for .htaccess to host games from another domain:

You'll need to change the domain name(s) for these codes. These examples use example.com & exampletwo.com.

Multiple sites:
<IfModule mod_headers.c>
SetEnvIf Origin "http(s)?://(www\.)?(example.com|exampletwo.com)$" AccessControlAllowOrigin=$0
Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
Header merge Vary Origin
Header set Access-Control-Allow-Methods "GET, POST, OPTIONS"
Header set Access-Control-Allow-Headers "Content-Type, Authorization"
</IfModule>



Single site:
<IfModule mod_headers.c>   
    Header set Access-Control-Allow-Origin "https://example.com"   
    Header set Vary "Origin"
    Header set Access-Control-Allow-Methods "GET, POST, OPTIONS"
    Header set Access-Control-Allow-Headers "Content-Type, Authorization"
</IfModule>