title: Symfony check for url segment
body: <p>What is the best way to check for a url segment?</p>
  
  <p>I have an event listener that checks if the user has completed their account if not they will be redirect to the account complete page.</p>
  
  <p>This works but it also redirects them even if they are viewing the public facing site. </p>
  
  <p>So I would like to check if the first url segment is 'admin' eg www.domain.com/admin.</p>
  
  <p>Thanks</p>