hky

www - Redirect Page

Cara Redirect webpage dalam bermacam gaya

kasus : redirect ke lostfocus.org

HTML

<html>
<head>
<meta http-equiv=”Refresh” content=”0;URL=http://lostfocus.org"&gt;
</head>
</html>

PHP

<?
header (“Location: http://lostfocus.org“);
?>

CGI

  • Perl
  • #!/usr/bin/perl
    print “Location: http://lostfocus.org\n\n“;

  • Python
  • #!/usr/local/bin/python
    print “Location: http://lostfocus.org\n\n“;

    (jangan lupa chmod file nya ke 755)

    JSP

    <%
    response.sendRedirect(“http://lostfocus.org“);
    %>

    Comments

    Proudly published with Hexo