1
init is the recommended hook and no, the rewrite rules will not be overwritten each time the hook fires or that the page is loaded, unless if you call flush_rewrite_rules() or WP_Rewrite::flush_rules() in your callback.
add_action( 'init', 'add_my_rewrite_rules' );
function add_my_rewrite_rules() {
add_rewrite_rule( ... );
flush_rewrite_rules(); // ...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
rewrite-rules × 1105url-rewriting × 540
permalinks × 248
custom-post-types × 211
custom-taxonomy × 107
htaccess × 99
urls × 64
plugins × 49
plugin-development × 46
mod-rewrite × 45
redirect × 40
pagination × 39
slug × 35
rewrite-tag × 33
404-error × 32
query-variable × 32
php × 31
multisite × 29
endpoints × 23
customization × 22
categories × 19
regex × 19
taxonomy × 17
archives × 17
wp-query × 14