title: How to rewrite url on java
body: <p>Currently, I want to rewrite url.
  Supposing that I have an url as below:
  <a href="http://myaddress.com/profile.php?user=MaFi" rel="nofollow noreferrer">http://myaddress.com/profile.php?user=MaFi</a>
  I want to display a shorter url to user. Maybe is <a href="http://myaddress.com/abcd" rel="nofollow noreferrer">http://myaddress.com/abcd</a></p>
  
  <p>Currently, I am also looking for the way to do it, Please tell me know the solution for this.
  Thanks,</p>
  
  <p>P/S: 
  the source url which we want to rewrite is getting from internet as the below picture. So we want to have a shorter url when display to user.
  <img src="https://i.stack.imgur.com/gbQMK.png" alt="enter image description here"></p>