You cannot use fragments in rewriting rules. Even if you send a redirect to /cadastro#tab3 the browser will just request /cadastro from the server. Without the fragment. That’s because fragments are just a hint for the browser to scoll to the specified position after a page is loaded. But they are NOT sent to the server as part of the request.
I guess you will have to use something like a query parameter instead. 🙁
Do you play Magic?
Get TopDecked MTG, the #1 Magic App, built by players, for players. Free to use, forever.