question: public String rewriteAllLinks ( final String html , final String requestHost ) { Document document = Jsoup . parse ( html ) ; Elements links = document . select ( "a[href]" ) ; Elements metas = document . select ( "meta[content]" ) ; updateAttribute ( links , "href" , requestHost ) ; updateAttribute ( metas , "content" , requestHost ) ; return document . toString ( ) ; }
target:  Rewrite all links in an HTML string based on the extensionless URLs settings.