Get current URL

 

For example, the current URL http://cs.sodddoo.com/news1/29109.html

curDomain = Request.ServerVariables ("HTTP_X_ORIGINAL_HOST") 'Current domain name: such as: cs.sodddoo.com

Request.Headers ("X-Rewrite-URL") 'Parameters behind the current domain name, for example /news1/29109.html
cur_url = "http: //" & curDomain & Request.Headers ("X-Rewrite-URL")' Current URL, such as: http://cs.sodddoo.com/news1/29109.html

Guess you like

Origin www.cnblogs.com/shiyi2014/p/12691298.html