• Resolved Leitner

    (@leitner)


    Ever few days Solid Security Basic crashes my .htaccess.

    Normally, at the top in my .htaccess there is a block with “#BEGIN iThemes Security”. Followed by “END iThemes Security” and some personal settings at the bottom.

    But every few days when Solid Security Basic is updating the HackRepair.com Blacklist, it crashes my whole website.
    instead of updating the block “BEGIN iThemes Security”, Solid Security delete my personal settings at the bottom of my .htaccess file and beginns a new block with “BEGIN iThemes Security”.
    So there are two “iThemes Security”-blocks any my settings are deleted.

    How can I fix this? This behavior is since weeks…

    Best Regards
    Patrick

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @leitner, glad you reached out!

    If Solid Security’s automatic writing to the .htaccess file keeps crashing, we recommend manually adding the plugin rules to your config files (which you can grab from?the Security > Tools page) instead. The code from the?Server Config Rules?will be added to the .htaccess file, while the code from?wp-config.php Rules?will be added to the wp-config.php file.

    Then, disable the “Write to Files” setting in?Security > Settings > Global Settings, which is responsible for the writing of rules. Don’t worry, the block and ban lists will still be enforced by the plugin even if this setting is disabled.?You can find?in this article?what features are enforced by .htaccess.?

    We have a recent finding from one of our users that this usually happens when a site’s server is low on disk space, so it might help if you can check if there’s sufficient server storage.

    Let me know if this helps!

    Thread Starter Leitner

    (@leitner)

    Hi @chandelierrr,

    thanks for your help.

    I’m not able to save the settings after uncheck “Write to Files”. Error Message: licensed_hostname_prompt is not of type boolean.

    I have 80GB free space left. I don’t thing this can be the problem.

    Best Regards
    Patrick

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi Patrick,

    I see, and thanks for checking the info on storage space!

    For that specific error, the instructions from this thread provided by nlpro should help resolve it. Can you please try it on your end and then confirm if you can save the Global Settings after?

    Thread Starter Leitner

    (@leitner)

    Hi @shanedelierrr,

    this fixed the issue with the global settings.
    I could see, that your linked thread treated exactly the same issue as mine.
    Is there any general fix? Disabling “Write to Files” is only a workaround.

    What else I could determine: when the issue happens, my .htaccess file has always 400 lines. And the last line (line 400) is only written half.

    I couldn’t found PHP-Errors at the time where the .htaccess file was written.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @leitner,

    Glad to hear that fixed it!

    There is no general fix for this at the moment frankly because it’s not replicable and so far only several people out of 900,000+ have experienced the issue. All of our efforts so far have been unsuccessful, but the moment we can replicate a problem, we can go about fixing it. 

    Some web hosts and/or third-party plugins take measures to prevent or improve security by trying to stop the writing to key files (such as wp-config.php and .htaccess), and our best guess at this point is that some setting on the host or within a third-party plugin is interfering with the expected writing to that file. However, we are currently unable to replicate this behavior, so we’re stuck.

    For now, that workaround is our best suggestion to resolve the issue.

    I hope this helps!

    Thread Starter Leitner

    (@leitner)

    @shanedelierrr

    Since I’ve set licensed_hostname_prompt to false, all works fine now.
    “Write to Files” is still enabled and no more crash could be noticed.

    I think the empty licensed_hostname_prompt causing this error.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @leitner, I see. We’ll be looking into this. Thank you for the update!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘crash .htaccess’ is closed to new replies.