Cleanup URL for a custom page in wordpress
You can do this with the internal rewrite system, which is parsed in php, not htaccess. First, add the rule. This assumes you have created a root page under Pages with the slug dictionary. function wpd_dictionary_rewrite(){ add_rewrite_tag( ‘%dictionary_word%’, ‘([^/]+)’ ); add_rewrite_rule( ‘^dictionary/([^/]+)/?$’, ‘index.php?pagename=dictionary&dictionary_word=$matches[1]’, ‘top’ ); } add_action( ‘init’, ‘wpd_dictionary_rewrite’ ); This code would go in … Read more