I need to do a redirect that works in the following way:
From Monday to Friday between 12:00am and 1:30am, and Saturday at 6pm to Sunday noon, I want my hyperlink to go to one page. But during all other hours, I want it to go to another page.
This is a pared down version of the html page that calls the .asp:
<html>
<head>
</head>
<body stylesrc="welcome.htm">
<td width="425"><a href="redirect.asp" target="_top">Click This Link</font></a></td>
</body>
</html>
This is the entire code in the redirect.asp page I am calling.
<%@LANGUAGE="VBSCRIPT"%>
<% Option Explicit %>
<%
dim dteDateTime
dteDateTime = now
if (Weekday(dteDatetime) <> "Sunday"
OR (Weekday(dteDateTime) <>
"Saturday"
) then
if (time >= "00:00" and time <= "01:30"
then
response.redirect " elseif (Weekday(dteDatetime) = "Saturday" and time >= "6:00"
OR
(Weekday(dteDateTime) = "Sunday" and time <= "12:00"
then
response.redirect " else
response.redirect " end if
end if
%>
The hosting server supports asp but I'm not quite sure why it's not working. Could someone help me figure out what's wrong? I don't really know much about ASP so it would be nice if someone can take a look at my code and see if something is missing.
Thanks!
From Monday to Friday between 12:00am and 1:30am, and Saturday at 6pm to Sunday noon, I want my hyperlink to go to one page. But during all other hours, I want it to go to another page.
This is a pared down version of the html page that calls the .asp:
<html>
<head>
</head>
<body stylesrc="welcome.htm">
<td width="425"><a href="redirect.asp" target="_top">Click This Link</font></a></td>
</body>
</html>
This is the entire code in the redirect.asp page I am calling.
<%@LANGUAGE="VBSCRIPT"%>
<% Option Explicit %>
<%
dim dteDateTime
dteDateTime = now
if (Weekday(dteDatetime) <> "Sunday"
"Saturday"
if (time >= "00:00" and time <= "01:30"
response.redirect " elseif (Weekday(dteDatetime) = "Saturday" and time >= "6:00"
(Weekday(dteDateTime) = "Sunday" and time <= "12:00"
response.redirect " else
response.redirect " end if
end if
%>
The hosting server supports asp but I'm not quite sure why it's not working. Could someone help me figure out what's wrong? I don't really know much about ASP so it would be nice if someone can take a look at my code and see if something is missing.
Thanks!