When clicking blogposts it redirects me to localhost I've installed CraftCMS on my localhost in a subfolder called blog, when creating a new blogpost and clicking on the link it redirects me to my localhost instead of the blogpost.

This video should show what happens.
https://gfycat.com/DemandingBitterGoldenmantledgroundsquirrel

My index php looks like this:

&lt;?php

// Path to your craft/ folder
$craftPath = '../../craft';

// Do not edit below this line
$path = rtrim($craftPath, '/').'/app/index.php';

if (!is_file($path))
{
    if (function_exists('http_response_code'))
    {
        http_response_code(503);
    }

    exit('Could not find your craft/ folder. Please ensure that &lt;strong&gt;
&lt;code&gt;$craftPath&lt;/code&gt;&lt;/strong&gt; is set correctly in '.__FILE__);
}

require_once $path;


Could someone please advise me on how I can get the posts to upload correctly?
You need to create an 'entry.html' file which lists the title, description etc.. within it. The link to the post should then direct you to the entry.html file.

/blog/entry.html