How to turn this .htaccess rule into a dynamic rule with add_rewrite_rule, et al?

Try this and follow the same structure to add more rewrite rules or query vars: add_filter(‘query_vars’, ‘my_query_vars’); function my_query_vars( $vars) { $vars[] = “land”; $vars[] = “expert”; return $vars; } // Add the new rewrite rule to existings ones add_action(‘init’,’my_rewrite_rules’); function my_rewrite_rules() { add_rewrite_rule( ‘land/(.+)/?$’ , ‘index.php?land=1&expert=$matches[1]’ , ‘top’ ); } Don’t forget to flush … Read more

WordPress keeps writing rewrite rules to .htaccess

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().

URL redirect on updating the post date

You could try redirecting without a plugin, using the .htaccess file. This file can be found at wordpress root folder, if all you want to do is redirect this specific page, you could open and insert the following line (at the first line of the .htaccess) Redirect 301 /2014/02/20/events-2014/ http://www.example.com/2014/03/02/events-2014/