{"id":6072,"date":"2017-01-24T14:04:28","date_gmt":"2017-01-24T11:04:28","guid":{"rendered":"https:\/\/www.karadere.com\/blog\/?p=6072"},"modified":"2017-01-24T14:05:53","modified_gmt":"2017-01-24T11:05:53","slug":"php-apache-access-control-allow-origin-multiple-origin-domains","status":"publish","type":"post","link":"https:\/\/www.karadere.com\/blog\/php-apache-access-control-allow-origin-multiple-origin-domains.html","title":{"rendered":"Php Apache Access Control Allow Origin Multiple Origin Domains"},"content":{"rendered":"<p>&lt;IfModule mod_rewrite.c&gt;<br \/>\n&lt;IfModule mod_headers.c&gt;<\/p>\n<p># Define the root domain that is allowed<br \/>\nSetEnvIf Origin .+ ACCESS_CONTROL_ROOT=karadere.com<\/p>\n<p># Check that the Origin: matches the defined root domain and capture it in<br \/>\n# an environment var if it does<br \/>\nRewriteEngine On<br \/>\nRewriteCond %{ENV:ACCESS_CONTROL_ROOT} !=&#8221;&#8221;<br \/>\nRewriteCond %{ENV:ACCESS_CONTROL_ORIGIN} =&#8221;&#8221;<br \/>\nRewriteCond %{ENV:ACCESS_CONTROL_ROOT}&amp;%{HTTP:Origin} ^([^&amp;]+)&amp;(https?:\/\/(?:.+?\\.)?\\1(?::\\d{1,5})?)$<br \/>\nRewriteRule .* &#8211; [E=ACCESS_CONTROL_ORIGIN:%2]<\/p>\n<p># Set the response header to the captured value if there was a match<br \/>\nHeader set Access-Control-Allow-Origin %{ACCESS_CONTROL_ORIGIN}e env=ACCESS_CONTROL_ORIGIN Header set Access-Control-Allow-Origin &#8220;*&#8221;<br \/>\n&lt;\/IfModule&gt;<br \/>\n&lt;\/IfModule&gt;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>veya<\/p>\n<p>&lt;IfModule mod_rewrite.c&gt;<br \/>\n&lt;IfModule mod_headers.c&gt;<br \/>\nHeader set Access-Control-Allow-Origin &#8220;*&#8221;<br \/>\n&lt;\/IfModule&gt;<br \/>\n&lt;\/IfModule&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lt;IfModule mod_rewrite.c&gt; &lt;IfModule mod_headers.c&gt; # Define the root domain that is allowed SetEnvIf Origin .+ ACCESS_CONTROL_ROOT=karadere.com # Check that the Origin: matches the defined root domain and capture it in # an environment var if it does RewriteEngine On RewriteCond %{ENV:ACCESS_CONTROL_ROOT} !=&#8221;&#8221; RewriteCond %{ENV:ACCESS_CONTROL_ORIGIN} =&#8221;&#8221; RewriteCond %{ENV:ACCESS_CONTROL_ROOT}&amp;%{HTTP:Origin} ^([^&amp;]+)&amp;(https?:\/\/(?:.+?\\.)?\\1(?::\\d{1,5})?)$ RewriteRule .* &#8211; [E=ACCESS_CONTROL_ORIGIN:%2] # Set the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[1],"tags":[235,400,482,728,2804,2801,2803,2802],"class_list":["post-6072","post","type-post","status-publish","format-standard","hentry","category-genel","tag-php","tag-access","tag-apache","tag-control","tag-domains","tag-ini","tag-multiple","tag-origin","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"views":954,"_links":{"self":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/6072","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/comments?post=6072"}],"version-history":[{"count":1,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/6072\/revisions"}],"predecessor-version":[{"id":6073,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/6072\/revisions\/6073"}],"wp:attachment":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/media?parent=6072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/categories?post=6072"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/tags?post=6072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}