R
redirection
Hey
I made a lil program to where if a certain server is down i can redirect all the traffic to another server. I can goto this secure page, type in some info and it changes this one field
My thought is that this page (below) reads where the "place" is. If the thing it calls is a "1" than it will goto this page, and any other character will goto the other pages. The problem with this is for some reason the code isnt workign below. I think i have all the logic. When i put all this info in the page and upload it just sits there. Am i missing something. All i want this page to do is look at database, check which value is in the page, and than it will redirect the people to the appriopate page
Any feedback/help would be great
Thanks!
<
Response.Expires = -1000 'Make sure the browser doesnt cache this pag
Response.Buffer = True 'enables our response.redirect to wor
Sub RedirectPlace
Dim myconn, objRS, ecom, blnLoggedI
Set myconn = Server.CreateObject("ADODB.Connection"
myconn.open = "Provider=SQLOLEDB.1;Password=XXX;Persist Security Info=True;User ID=XXX;Initial Catalog=XXX;Data Source=XXX.XXX.XXX.XXX
ecom =
Set objRS = myconn.execute("SELECT place FROM redirection_switch WHERE name='" & "Test" & "';"
If objRS.EOF Then '''NO RECORDS MATCH. USER DID NOT LOG IN CORRECTL
Response.Redirect "http://www.downloads.com
Els
If objRS("place") = ecom Then '''NO RECORDS MATCH. USER DID NOT LOG IN CORRECTL
Response.Redirect "http://www.microsoft.com
Els
Response.Redirect "http://www.cnn.com
objRS.Clos
Set objRS= Nothin
myconn.clos
set myconn = nothin
End I
End I
End Su
%>
I made a lil program to where if a certain server is down i can redirect all the traffic to another server. I can goto this secure page, type in some info and it changes this one field
My thought is that this page (below) reads where the "place" is. If the thing it calls is a "1" than it will goto this page, and any other character will goto the other pages. The problem with this is for some reason the code isnt workign below. I think i have all the logic. When i put all this info in the page and upload it just sits there. Am i missing something. All i want this page to do is look at database, check which value is in the page, and than it will redirect the people to the appriopate page
Any feedback/help would be great
Thanks!
<
Response.Expires = -1000 'Make sure the browser doesnt cache this pag
Response.Buffer = True 'enables our response.redirect to wor
Sub RedirectPlace
Dim myconn, objRS, ecom, blnLoggedI
Set myconn = Server.CreateObject("ADODB.Connection"
myconn.open = "Provider=SQLOLEDB.1;Password=XXX;Persist Security Info=True;User ID=XXX;Initial Catalog=XXX;Data Source=XXX.XXX.XXX.XXX
ecom =
Set objRS = myconn.execute("SELECT place FROM redirection_switch WHERE name='" & "Test" & "';"
If objRS.EOF Then '''NO RECORDS MATCH. USER DID NOT LOG IN CORRECTL
Response.Redirect "http://www.downloads.com
Els
If objRS("place") = ecom Then '''NO RECORDS MATCH. USER DID NOT LOG IN CORRECTL
Response.Redirect "http://www.microsoft.com
Els
Response.Redirect "http://www.cnn.com
objRS.Clos
Set objRS= Nothin
myconn.clos
set myconn = nothin
End I
End I
End Su
%>