rewrite ldap