Thread: redirect

    #1
  1. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    15
    does perl or even html have a redirect method (ie redirecting a browser)?
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    12
    Rep Power
    0
    I think this is what you are asking for, I got it from www.htmlhelp.com

    "<META HTTP-EQUIV="refresh" CONTENT="n; URL=http://foo.bar/">
    This is a so-called "meta refresh", which on certain browsers causes the document mentioned in the URL to be loaded after n seconds. This can be used for slide shows or for often-changing information, but has some drawbacks. In particular, if you use a value of zero seconds, the user can no longer go "Back" with his back button. He will be transferred to the specified URL, and when he presses "back" there, he will go back to the document with the refresh, which immediately redirects him to the document he tried to get away from."

    You should use this between the <HEAD>...</HEAD> tags.

    Good Luck! (:
  4. #3
  5. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Here is the Perl way:

    #!/usr/local/bin/perl
    print "Location: <A HREF="http://foo.bar.com/nn";" TARGET=_blank>http://foo.bar.com/nn";</A>

    The best and fastest way, however, is to use htaccess directive -> http://www.apache.org/docs/mod/mod_alias.html#redirect


IMN logo majestic logo threadwatch logo seochat tools logo