Redirect sub-page URLs to parent without changing URL

Milo’s comment got me there:

add_rewrite_rule(
    "^{$slug}/",  
    "index.php?location={$slug}", //changed query var to location
    'top'
);

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