Detect if request is coming from wordpress conditional statement

It is going to be hard to give a solid answer without knowing exactly how you’ve cobbled things together but a preview always has preview=true in the URL. Just check that.

if (isset($_GET['preview']) && 'true' == $_GET['preview']) {
    // send the page to WordPress
} else {
    // load index.html  I guess ?
}

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