SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Redirect

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    May 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Redirect

    Hello I have a problem trying to modify some code and think it should be simple but I can't figure it out and any help would be appreciated.

    I have this code

    Code:
            <% startDate=cdate("10/4/2012 00:00:00")%> <% endDate=cdate("10/20/2012 12:00:00")%> 
    <%If now() < startDate or now() > endDate Then Response.Redirect("expire.asp")%>
    On Index.asp, and when it is in between the start and end date it will show Index.asp otherwise if its not in between those dates it goes to expire.asp.

    Basically what I need to do is reverse it so that in between the dates it shows expire.asp and the rest of the time it shows index.asp.

    Thanks for any help

  2. #2
    SitePoint Enthusiast
    Join Date
    Jan 2012
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <%If now() > startDate and now() < endDate Then Response.Redirect("expire.asp")%>

  3. #3
    SitePoint Member
    Join Date
    May 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! I knew I was missing something small.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •