The Fragment is never sent to the server, according to this thread on the Mod_Rewrite forums. So, this might be impossible unless you use AJAX to change the page after the fact.
Another idea would be to have Javascript turn the hash into a $_GET paramater, and then refresh the page.