Using Apache/2.4.54 (Win64)
I have been requested to rewrite from old domain to new like this
- From
https://oldtest.mydomain.com/company/customerpage/#/customer/<getThisNumber>/something
- To
https://newtest.mydomain.com/company/something/customer/<getThisNumber>
It could have been fine, using regex to grab the number and pass it to the new and then just redirect using [L,R=301].
But ref. this post on StackOverFlow
I know the hashtag is a fragment identifier and that strings after the hashtag aren't something you can process with mod_rewrite, but I was expecting the hashtag itself to show up. So I've tried rules to match like these
So what I have tried is (snippet)
<LocationMatch "^\/company\/customerPage\/">
LogLevel alert rewrite:trace3
RewriteCond %{QUERY_STRING} ([0-9]*)\/something$
RewriteRule ^(.*)$ "https://newtest.mydomain.com/company/something/customer/$1" [L,R=301]
This does not work, question is if I have a minor issue in my code or I am also aware that there might be a risk for this not being doable...but hopefully not.