title: How to identify if referrer is a 301 redirect
body: <p>I'm implementing a slug system for my website at the moment. I plan to redirect invalid slugs to the correct on that is stored in the database.
  E.g.</p>
  
  <blockquote>
    <p><a href="http://example.com/11/wrong-slug" rel="nofollow noreferrer">http://example.com/11/wrong-slug</a></p>
    
    <p>Hit db, check if 11's slug is wrong-slug if not do 301 redirect</p>
    
    <p><a href="http://example.com/11/right-slug" rel="nofollow noreferrer">http://example.com/11/right-slug</a></p>
    
    <p>Detect 301 and inform user that they followed an invalid link</p>
  </blockquote>
  
  <p>Is it possible to identify the 301 redirect preferably using PHP so I can ask the user to update there bookmark etc.</p>
  
  <p>Thanks,
  Jamie.</p>