title: Url hash as password
body: <p>When user types url with custom hash ex url: <strong>example.com/YT6pTeHDNoROFuXeeDiS</strong></p>
  
  <p>then website validates that hash as a password</p>
  
  <p>and then redirects to ex url: <strong>example.com/placeToBe</strong></p>
  
  <p>but when directly accessed <strong>example.com/placeToBe</strong> it will ask that custom hash or show error page or redirects</p>
  
  <p>in short:<br>
  <strong>YT6pTeHDNoROFuXeeDiS</strong> corresponds to <strong>placeToBe</strong> directory and not the other way around
  <br>
  <br>
  db example:<br>
  <strong>MJJFWYQYKLXULGTWIE5M</strong> => <strong>placeToBe1</strong><br>
  <strong>3O5OBD77M5S12ZD2PHXY</strong> => <strong>placeToBe2</strong><br>
  <strong>IHVL7LMRTL02NJJN6LPA</strong> => <strong>placeToBe3</strong><br>
  <strong>...</strong>
  <br>
  <br>
  I know how to do this in php:<br>
  when hash url entered then browser is redirected to custom 404 page,<br>
  then that 404 page contains filter for hash, if hash passes and validates<br>
  then script creates cookie for corresponding dir and then<br>
  redirects to that directory<br>
  directory index kindly checks, ok you got my cookie :D and then allows to browse<br>
  its content.</p>
  
  <p><br>
  <br>
  But my interest lies in .htaccess and apache sorcery, thus my question:<br>
  <strong>how can I conditionally set and check a cookie with and then redirect to right dir using .htaccess?</strong></p>