title: How to make a 301 redirect from PHP?
body: <p><code>domain.com/video.php</code> – this link should redirect to <code>domain.com/videos/</code>.</p>
  
  <p>I’ve tried but it isn’t working. I want 301 redirect.</p>
  
  <p>This is my code in <code>video.php</code>:</p>
  
  <pre><code>&lt;?php
  // 301 redirect from php
  header('Location: /videos/');
  ?&gt;
  </code></pre>
  
  <p>I want the full code for doing this. Please help me.</p>