0

Currently, I want to rewrite url. Supposing that I have an url as below: http://myaddress.com/profile.php?user=MaFi I want to display a shorter url to user. Maybe is http://myaddress.com/abcd

Currently, I am also looking for the way to do it, Please tell me know the solution for this. Thanks,

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. enter image description here

user3737020
  • 514
  • 11
  • 27

2 Answers2

1

UrlRewriteFilter is compatible with any Java EE server.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
coyote
  • 169
  • 4
  • 1
    note that you also need to bind to root context with an app before using urlrewriter from the app. – eis Dec 10 '14 at 09:17
0

The address you are showing a probably is dynamic URL which doesn't necessarily always exist. So there is no point in shortening it. If you want to persist it then you can probably manipulate the query string.

Kuldeep Verma
  • 104
  • 1
  • 12
  • this answer makes no sense. OP wants a shorter url for end user to use. What is your solution on implementing it? – eis Dec 10 '14 at 09:16
  • + eis : do you have any solution for this ? I appriciate your help in this case. Thanks – user3737020 Dec 11 '14 at 02:46
  • You can use bit.ly, its a URL shortening service. Get its java api and use this is your code. This example may help you [https://code.google.com/p/bitlyj/](https://code.google.com/p/bitlyj/) – Kuldeep Verma Dec 11 '14 at 04:56