• Resolved cmeidam

    (@cmeidam)


    Ever since the plugin switched from iThemes to Solid Security Basic, the plugin has been writing to the .htaccess incorrectly. It’s duplicating the block that starts with “# BEGIN iThemes Security”. It writes the first portion correctly, but it duplicates below without finishing, so the last line is just “Rewri” which creates a syntax error and 500 error’s the sites.

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

    (@shanedelierrr)

    Hi @cmeidam, does it help if you flush the generated rules by clicking the “Run” button in Security > Tools > Server Config Rules?

    Thread Starter cmeidam

    (@cmeidam)

    I ran the Server Config Rules and it wrote properly to the htaccess file. However, this issue occurs when the plugin writes the the htaccess file automatically. Because this issue throws a 500 server error, I have to manually go in and fix the htaccess (because I can’t log into the site if there is a 500 error). I manage over 100 WP sites with this plugin, and it’s happened to approximately 30 sites over the last week since the switch from iThemes to Solid Security Basic.

    Plugin Support chandelierrr

    (@shanedelierrr)

    @cmeidam, it’s great to know flushing the Server Config Rules in the plugin settings works as expected. The plugin writes to the .htaccess file from time to time, and something else could be causing it to fail to write the rules correctly on some of your sites.

    Could you please confirm that those sites use the required WP and PHP versions and have SSL configured properly? If so, can you please check your server’s PHP error logs for any related errors and send them here? Please also check in with your host if there are any associated server downtime errors.

    Looking forward to hearing from you!

    Thread Starter cmeidam

    (@cmeidam)

    Yes, the sites are using required WP version (6.3.2), and the PHP versions of the sites ranges from 7.4 to 8.0, and it’s happening regardless. SSL is configured properly. There have been no downtime errors, the only php error in the logs regarding this issue is a core alert. “[path]/.htacces: Invalid command ‘Rewri’, perhaps misspelled or defined by a module not included in the server”

    Plugin Support chandelierrr

    (@shanedelierrr)

    @cmeidam, thank you for confirming! I’ll report your case to our developer for additional insights and will get back to you when I receive feedback.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @cmeidam, can you please confirm whether the generated rules in Tools > Server Config Rules are correct? If so, we recommend turning off “Write to Files” in Global Settings to prevent the crashes and manually add the rules. You can find in this article what features are enforced by .htaccess. Hope this helps!

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi?@cmeidam,?

    I hope the information provided helped resolve the issue. Tracking notifications on this forum can become tricky over time, and since we haven’t received a response, I’ll mark this post resolved.

    If you still require further assistance, feel free to open a new support topic, and we’d be happy to assist.

    Thank you!

    alexgwcog

    (@alexgwcog)

    Hi There,

    Just to +1 on this we’ve been seeing this issue on lots of sites.

    We’d like to keep our block and ban lists up to date so turning off writing to files doesn’t seem like a good long term solution is there a fix in the works for this?

    All the Best,
    Alex

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @alexgwcog, to follow the forum?guidelines, could you please open a new support topic? We’ll be sure to respond there. Thank you!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Writing to .htaccess file incorrectly’ is closed to new replies.