Results 1 to 4 of 4

Thread: Redirect

  1. #1
    Join Date
    Nov 2003



    how can i redirect to the last viewed page.

    for example, click on a link that will take me to a page which will say
    "sorry this page is underconstruction, we will redirect you to the last viewed page."

    and then 4 seconds or so later it will redirect them to the page that they click the link from,

    i know javascript can use
    "history.go(-1);;return false" to back to the last page, but i cant seem to put it onto a auto redirect.

    i need it like this and not like a URL just goin bac to that page coz i want this redirect page to be universal to use anytime on the server, without reprogramin the page link.

    any help will be great thanks

  2. #2
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    East Lansing, MI USA
    You could call the javascript via onload but that would happen immediately (and not 4 seconds later).

    I know...

    Write a javascript function that first makes an alert box (alert()) that says "Blah blah not done blah blah" then have the function do the history.go. You can then load this function "onload" in the body tag and you'll be all set.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  3. #3
    Join Date
    Dec 2003

  4. #4
    Junior Registered
    Join Date
    Mar 2004
    Someone correct me if im wrong but wouldnt it be possible to use a server side language (such as PHP) to get the referrer page and insert that into a meta tag redirect?

    Im thinking this would work:

    $prev_url = $HTTP_REFERER;
    <META http-equiv="refresh" content="4;URL=<?=$prev_url?>">

Similar Threads

  1. redirect a to website
    By ronp in forum General Management Issues
    Replies: 2
    Last Post: 04-08-2004, 11:54 PM
  2. redirect url?
    By bongie in forum Domain Names
    Replies: 6
    Last Post: 02-05-2004, 01:40 PM
  3. need to exclude one page from a general .htaccess redirect
    By Apollo in forum General Management Issues
    Replies: 1
    Last Post: 01-10-2004, 01:56 PM
  4. redirect with htaccess
    By albsure in forum Website Programming & Databases
    Replies: 6
    Last Post: 12-07-2003, 09:40 AM
  5. Redirect
    By lemon in forum Search Engine Optimization
    Replies: 1
    Last Post: 09-09-2003, 12:47 PM


Posting Permissions

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