Fix routing bug in attachment.php