Three Types Page Redirect using HTML,Javascript,PHP

 

Today we are going to learn how to redirect a page

1)Using HTML

<!DOCTYPE html>
<html>
<head>
    <title>Redirect</title>
    <meta http-equiv = "refresh" content = "5; url = https://mwtc.in" />
</head>
<body>
        <h2>Welcome Redirect</h2>
</body>
</html>


2)Using Javascript

<!DOCTYPE html>
<html>
<head>
    <title>Redirect</title>
</head>
<body>
        <h2>Welcome Redirect Javascript</h2>

<script type="text/javascript">
    window.location.href="http://facebook.com";
</script>
</body>
</html>

 
3)Using PHP 

<?php
header("Location: https://yahoo.com");
?>
<!DOCTYPE html>
<html>
<head>
    <title>Redirect</title>
</head>
<body>
        <h2>Welcome Redirect PHP</h2>


</body>
</html>

Comments

Popular posts from this blog

Target class controller does not exist - Laravel 8