title: Store URL into variable and then pass into header redirect - PHP
body: <p>I am getting syntax errors and so I need some help.</p>
  
  <p>I am using PHP to redirect the user</p>
  
  <pre><code>header( 'Location: http:/domain.com/' ) ;
  </code></pre>
  
  <p>Edit: I want to store the URL to this page into a variable and then append that URL to the location in the header. </p>
  
  <p>For example, the user goes to <a href="http://www.domain.com/permalink" rel="nofollow">http://www.domain.com/permalink</a> I want to store '/permalink' into a variable and then pass it into the header so that the user is redirected to <a href="http://domain.com/permalink" rel="nofollow">http://domain.com/permalink</a> instead of just <a href="http://domain.com" rel="nofollow">http://domain.com</a></p>
  
  <p>How do I do this in PHP?</p>
  
  <p>Thanks</p>