Link overwriting method and device based on SSL VPN

This invention discloses a link rewriting method based on an SSL VPN including the following steps: SSL VPN gateway receiving a link sent from an internal network server to a remote host; the SSL VPN gateway rewriting the link according to the corresponding relation of the resource address of the internal network server configured locally and a gateway virtual path expressed by the resource ID; the SSL VPN sending the rewritten link to the remote host. This invention also discloses an SSL VPN gateway device. The invention adopts the resource ID instead of the corresponding real network path in the gateway virtual path, so that the gateway can directly obtain the resource ID. The search speed of the table entry is quickened by collecting the index of the table entry according to the ID. At the same time, the invention effectively shortens the link length by adopting the virtual path containing the resource ID. Besides, the search of the table entry corresponding to full link is only executed during the user access, which avoids the time waste during the page rewrite.