简体   繁体   中英

How to rewrite url on java

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. 在此处输入图片说明

UrlRewriteFilter与任何Java EE服务器兼容。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM