In short – you cannot, or at least should not.
www.domain.com/post-title
is interpreted as post (if your structure is %postname%
) and/or a page – and WordPress is set to deal with them as such, including any conflicts.
You can do the following:
add_action('init','wpse0845_add_rule');
function wpse0845_add_rule(){
add_rewrite_rule("([^/]+)/?",'index.php?book=$matches[1]','top');
}
(and then flush rewrite rules, once).
However, you’ll notice that now your pages (and depending on your structure, posts too) give a 404.