Is it possible to match site root with a WP rewrite rule? [closed]
Turns out I was being dumb. The rule is ‘$’
Turns out I was being dumb. The rule is ‘$’
Using a custom 410 page
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().
WP Rewrite issue
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/
How to change the Author Slug from Username to Nickname and deal with Special Characters
Rewrites: .htaccess or wp_rewrite for bulk 301 changes?
simple add_rewrite_rule added, refuses to work
I used the following functions to solve this problem. //This adds a custom query variable to the permalink function add_custom_query_var( $vars ){ $vars[] = “shop_name”; return $vars; } add_filter( ‘query_vars’, ‘add_custom_query_var’ ); function add_rewrite_rules($aRules) { $aNewRules = array(‘shop/([^/]+)/?$’ => ‘index.php?pagename=shop&shop_name=$matches[1]’); $aNewRules2 = array(‘shop/([^/]+)/gallery/?$’ => ‘index.php?post_type=gallery’); $aRules = $aNewRules + $aNewRules2 + $aRules; return $aRules; } … Read more
Add word to permalink when custom field has a value