So I have a main website, and I've attached an alias domain to it, pretty simple and done many times in the past with success.
Now, while surfing on the alias itself, It won't load the fonts due to CORS policy, "access-control-allow-origin" does not match between the actual website and the alias itself.
Now I went into the htaccess and I manually approved access to the 2 domain names, and even used * to allow all just for matter of checking if it works, but it did not.
Example of the code I put in the htaccess:
This is the main domain:
example.com
This is the Alias:
envisage.studio
I dont want to allow origin with * because it is a serious security issue, I just want both domains to functions as 1 website like alias is supposed to do.
Now, while surfing on the alias itself, It won't load the fonts due to CORS policy, "access-control-allow-origin" does not match between the actual website and the alias itself.
Now I went into the htaccess and I manually approved access to the 2 domain names, and even used * to allow all just for matter of checking if it works, but it did not.
Example of the code I put in the htaccess:
Code:
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin http://example.net
Header set Access-Control-Allow-Origin htp://example.com
Header set Access-Control-Allow-Credentials true
</IfModule>
example.com
This is the Alias:
envisage.studio
I dont want to allow origin with * because it is a serious security issue, I just want both domains to functions as 1 website like alias is supposed to do.
Attachments
-
388.8 KB Views: 11
Last edited by a moderator: