• Resolved Ware

    (@dmware)


    Hello, I have added this rule to the htaccess:

    Header always unset X-Frame-Options
    Header set Content-Security-Policy “frame-ancestors ‘self’ https://www.domain1example.com https://www.domaintwoexample.it”

    After a few weeks it gets deleted. i asked the hosting they say they did not touch anything.

    I read another topic in this forum about this but it seems like a mistery. I did not install any security plugin on WP.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Alexandru Tapuleasa

    (@talextech)

    Hi,

    I really have no idea. Our plugin will definitely not write the file on it’s own as it has the protection mechanism that tests the file via AJAX before writing it and without you actually opening the editor page it won’t change anything.

    Otherwise it can be anything, a plugin, WordPress itself if you added your line between
    #BEGIN WordPress and #END WordPress, some server script, restoring a backup maybe, it’s hard to say ??

    Thread Starter Ware

    (@dmware)

    Thanks. Sctually yes, I did put the rule before #END WordPress.

    Is that what the problem was? when is that overridden? when i update the wordpress core or the theme or any plugin?

    Plugin Author Alexandru Tapuleasa

    (@talextech)

    Hi,

    Yes, if you change permalink settings WordPress will update that block and overwrite anything between BEGIN and END WordPress

    Just add your rule before (you can add RewriteEngine, RewriteBase again if needed, no problem), for example:

    RewriteEngine On
    RewriteBase /
    Header always unset X-Frame-Options
    Header set Content-Security-Policy “frame-ancestors ‘self’ https://www.domain1example.com https://www.domaintwoexample.it”

    #BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    #END WordPress

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HT access rule gets deleted periodically’ is closed to new replies.