Title / Description
Code Function redirectcheck(xurl, ourl) 'check the xurl end if exists, response.redirect with 301 set Geturl = Server.CreateObject("ADODB.Recordset") Geturl.ActiveConnection = MM_connection_STRING query = "SELECT ID_UrlLookup, strExternalUrl, strInternalUrl FROM tblUrlLookup WHERE strExternalUrl = '"&xurl&"' OR strExternalUrl = '"&ourl&"'" Geturl.Source = query Geturl.open() if Geturl.EOF then 'do nothing else ' response.redirect Response.Status="301 Moved Permanently" Response.AddHeader "Location", lcase(Geturl("strInternalUrl")) 'done? end if End Function
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code