Using URL rewrite to add custom URL for custom post type

pagename assumes the page post type. You need to use the custom post type query var in your rule instead. Presumably you also want to detect that this is a request for en, you can add your own rewrite tag to store that, then add that to the rule:

add_action('init', 'add_my_rule');

function add_my_rule() {
    add_rewrite_tag('%my_language%', '([^&]+)');
    add_rewrite_rule(
        '^en/posttype/([^/]*)?/?$',
        'index.php?posttype=$matches[1]&my_language=en',
        'top'
    );
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)