search

Home  >  Q&A  >  body text

How does apache redirect 301? I hope there is a video tutorial

How does apache redirect 301? I hope there is a video tutorial

phpcn_u104617phpcn_u1046172564 days ago1313

reply all(2)I'll reply

  • 寻觅 beyond

    寻觅 beyond2018-02-05 10:47:30

    You can use header for redirection, you can also modify the apache configuration file or add a .htaccess file

    reply
    1
  • 寻觅 beyond

    寻觅 beyond2018-02-05 10:46:24

    <?php
    // 301 Moved Permanently
    header("Location: /foo.php",TRUE,301);

    // 302 Found
    header("Location: /foo.php",TRUE,302);
    header("Location: /foo.php");

    // 303 See Other
    header("Location: /foo.php",TRUE,303);

    // 307 Temporary Redirect
    header("Location: /foo.php",TRUE,307);
    ?>

    reply
    1
  • Cancelreply