Different Permastruck Between Ajax Request & Normal Request

So i examine several plugin to learn how it work and find solution by using add_permastruct

add_permastruct( 'job', "https://wordpress.stackexchange.com/" . $slug . '/%job%', array(
            'with_front'  => false,
            'ep_mask'     => EP_NONE,
            'paged'       => false,
            'feed'        => false,
            'forcomments' => false,
            'walk_dirs'   => true,
            'endpoints'   => false,
        ));

and the problem is solved 🙂

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