I am not sure why this happens, but you can stop all write access to your .htaccess with a simple filter:
add_filter( 'flush_rewrite_rules_hard', '__return_false' );
Neither WordPress nor any plugins calling flush_rewrite_rules()
will write something into the file now. Other methods to access and change the file will still work, for example insert_with_markers()
.
Related Posts:
- How to add custom rewrite rule to .htaccess?
- SEO Friendly URLs for my plugin categories
- Custom rewrite rules are sending everything to index.php
- WordPress keeps writing rewrite rules to .htaccess
- WordPress Rewrite
- Dynamic URL, not a physical page within the database
- Custom rewrite rule
- hard flush_rewrite_rules() not regenerating .htaccess
- Map alt domain to specific section of website w/o MU
- Rewrite rule to load images from production does nothing
- WordPress rewrite rules don’t need ^?
- Url Rewriting a dynamic wordpress page
- My WP_options db rewrite_rules Does Not Work
- Disable Pagination on Pages
- .htaccess rewrite
- Changed pagination URLS to use p= instead of paged=
- Rewriting “pretty” blog category URL with htaccess / add_rewrite_rule() causes 404 page
- Customise particular RSS permalink
- RSS feed rewrite matching wrong rule
- Rewrite specific action url
- How do I make WordPress revise an .htaccess file a certain way?
- Rewrite rule that wp-login.php?action=register is left alone
- Pretty URL via Rewrite
- Migration from old CMS to WordPress 301 redirection rules?
- Additional .htaccess rules based on wp page
- What is the proper way to use add_rewrite_rule to remove the (question mark)?
- Can’t get pretty permalinks to work without index.php
- Rewrite Page Parameters
- WP-Include rewrite directory
- How to create custom URL routes?
- web.config conflict on IIS
- Passing parameters to a custom page template using clean urls
- add_rewrite_rule: $matches var not replaced by captured value
- How-to add rewrite rules to point the uploads folder to a subdomain
- Mod_rewrite delete parameter in 301 Redirect
- add_rewrite_rule not working for page var
- WordPress URL rewrite regex
- Adding the amp url prefix to the beginning
- Tricky URL rewrite with custom values in url
- Add rewrite rule to call front-page.php?
- Add a query string to ALL links on site
- How make a multi language routes, with rewrite rules or rewrite endpoints?
- Add rewrite rule for rewrite endpoint
- Having trouble with using add_rewrite_rule and pagination
- Issue with using .htaccess to redirect feedburner feed
- Rewriting URLs in WordPress
- add_rewrite_rule() to route to file other than index.php
- Custom query_vars and parse_request on wp-admin
- ‘rewrite_rules_array’ or ‘generate_rewrite_rules’ for adding custom rewrite rules?
- WordPress SSL (https) is not working with custom permalink
- Custom rewrite not working
- WordPress .htaccess blocks mine?
- Custom rewrite_rules – only pass numbers and not alphabetic characters
- How to add a custom redirect rule for Post as subdomains?
- How to preserve the query string while using add_rewrite_rule and default public query vars
- “View post” leads to odd URL
- How to use add_rewrite_rule in subdomain
- Rewrite the default post object’s permalink
- Map secondary domain to other’s virtual subfolder
- Enpoint Not Found in Rewrite Tag Permalink
- URL Rewrite and add_query_var not working
- How to add custom rewrite rules and point to specific templates
- Custom rewrite after the default term link URL
- How can I reduce the number of rewrite rules?
- ow to change cutsom page url of wordpress site using htaccess
- Name page template properly
- One off rewrite for single post-type slug (show normal page with same URL instead)
- Adding Rewrite URL for Base + Children Separately
- WordPress rewrite rules not working
- WP redirect rule doesn’t work
- URL rewrite in theme doesn’t seem to be working
- Custom url structure – pages under a custom post type
- Trying to add array of paths to post permalink
- How to rewrite URL back to default custom URL if no destination found
- Dynamic URL with rewrite rule not working
- How can I add a vanity URL for admin-ajax.php Calls?
- Remove part from dynamic url and redirect
- How to get relative page for every post: /post-1/contact. /post-2/contact
- Rewrite rule can’t get the ID from rewrited
- WordPress Rewrite Rule to EITHER Match 1 or 2 Taxonomies when adding to URL
- WordPress numeric (yearly) page names / disable yearly archives
- Is it possible to rewrite a page URL from ID to name from an API?
- Moved WordPress to Subdirectory, still hijacking requests to files outside of its directory
- Rewrite URL query string for all pages
- Rewrite Rule added but showing 404 rather than specified page
- Url wordpress rewrite
- Blog List Page 404 With Custom Post Type Rewriting to Blog Parent
- ModRewrite not working properly
- Need help with custom rewrite rule
- rewrite rules social share links
- add_rewrite_rule is not fired
- URL rewrite results in a 404, but everything should work!
- Custom URL scheme – paramters on custom post type
- get_permalink is getting old rewrite rule
- Apache rewrite rules and wordpress problem
- Custom Rewrite for Profiles
- WordPress Custom Rewrite Rule
- Rewrite function
- WordPress total posts per page changed and now 404 Http error comes out [closed]
- Wrong rewrite rules