Пытаюсь отправить POST запрос с одного поддомена на другой но появляется ошибка:
Failed to load https://sub2.site.com/query.php: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://sub1.site.com' is therefore not allowed access.
Вот .htaccess поддомена на которого идёт запрос.
DirectoryIndex index.html
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1%{REQUEST_URI} [R=301,QSA,NC,L]
RewriteCond %{ENV:HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{REQUEST_URI} !^\/query.php
RewriteRule ^(.*)$ index.html?%{REQUEST_URI} [QSA,L]
Пытался добавить исключения, но устранить ошибку никак не удается.