x-frame-option multiple domains wp

BEST WAY (in wp-config.php):

if (!strstr($_SERVER[‚REQUEST_URI‘], ‚XXX-content‚))
{header(‚X-Frame-Options: SAMEORIGIN‘);}

apache.conf / bzw. seite-available im directory part: (klappt nur bei realen FILES/DIRs nicht bei umleitungen!!!

<IfModule mod_headers.c>
# Allow some urls, block all others; whitelisting
<LocationMatch ^((?!(firstUrlAllowed|secondUrlAllowed)).)*$>
Header always append X-Frame-Options SAMEORIGIN # Block any site from applying an iframe.
</LocationMatch>
</IfModule>

Comments are closed.