Change Sidebar for rewritten page

It’s hard to tell your exact requirements, but testing to see which handle to pass to dynamic_sidebar is probably your best bet, since it’ll allow you to administer each version from the WordPress back-end. Don’t forget to register each version with register_sidebar

The other thing that might be what you’re after is the sidebars_widgets filter, which lets you edit the global widgets array when it’s accessed within dynamic_sidebar.

A sidebar is part of the template applied to the post/page, I can’t see any way that changing it directly via a rewrite rule would make sense from a functional perspective.