All links in WP blog redirect to main non-WP site

make a backup of your SQL database for the site and try running these queries manually on the database through php myadmin. change the URLs to match your site http://example.com/blog

As always, be careful when running queries on the database

 UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name="home" OR option_name="siteurl";

 UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

 UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

 UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');