Posted: August 15, 2022 at 8:30 am
|
file keeps getting overwritten and causes the frequent 404 errors. While working last night in the background of our site, I received this error on two separate occasions: |
Hi there, Is this on an EE event endpoint or something else? EE itself does not alter your .htaccess file, it does call to flush permalinks but does so using WordPress itself using flush_rewrite_rules() which can rewrite .htaccess to the default. Are you adding your own write rules to |
|
|
I have used these two configs of the htaccess but both have been overwritten by something to make the site fail: <IfModule mod_rewrite.c> # END HTTPS Forced Redirect <IfModule mod_rewrite.c> and 2 – Every time we update EE or do a batch process of events the htaccess gets overwritten. |
Do you not have |
|
|
When the overwrite knocks the site offline, the #BEGIN WordPress and #END WordPress appears on the bad htaccess file. I’ve been removing it and the site goes back online. We have to get the site stable so registration for the event can begin (now postponed 5 days). Can you tell me what is causing this cycle of 404 Errors? |
|
Thanks for your help with this. It’s really stressful for this small non-profit. I deactivated the ReallySimple SSL plugin, since BlueHost has the Let’s Encrypt SSL feature that forces the https on the domain. For the record, both of these were turned on and the site didn’t have 404 Errors before the last WP update to 6.0 and EE’s recent update. |
WordPress has its own set of rewrite rules that must be present, to find those rules within the htaccess file it uses the If you are removing those comments WordPress can’t find the default rewrite rules and will simply overwrite the file.
What exactly are you removing? This is what you should have by default most of the time: https://wordpress.org/support/article/htaccess/ Anything outside of those is custom and being added by something else.
No, because the issue above isn’t clear currently. |
|
|
Thank you! That worked and the site didn’t go down. BlueHost had provided us a default htaccess file but it didn’t have the #BEGIN/#END WordPress language. |
Awesome, I’m glad it worked 🙂 |
|
The support post ‘htaccess file corruption issues causing the 404 Errors’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.