I believe this can't be done, but it would be good to confirm either way. To know if it's worth investing more time in or not.
.htaccess file rewrite/redirect:
be redirected to:
I'm starting to assume that the server does not see anything past the
#. I am also trying to add a UTM parameter after
#heading2 in the process. The current rewrite is adding
#heading2 appended directly after the UTM paramter.
Any confirmation would be appreciated.
EDIT: Apparently I was understanding the issue wrong due to the combination of anchors with UTM parameters. The URL was properly redirecting via
.htaccess, it's just that I was unaware that the
#anchor should always go at the end of the URL, even if there's a UTM parameter before it. Reference.
Therefore the right URL was always supposed to look like: