<p>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.</p>

<pre><code>/blog/entry.html
</code></pre>

CC BY-SA 3.0
2017-04-17T18:34:15.520Z
I mean, I created the craftcms in a subfolder instead of the root, its in /blog/ instead of the public_html root, but now when I'm creating content it just redirects to the homepage instead of to the post when clicking on the link.

It seems to just be redirecting to localhost, instead of localhost/blog/ when I click on one of the links it directs to something like this: localhost/index.php?p=news instead of localhost/blog/index.php?p=news
PKGrem
CC BY-SA 3.0
2017-04-17T18:14:03.673Z
2017-04-17T18:14:03.673Z
JMKelley
<p>Make sure your "Site URL" setting in the control panel under Settings->General is set to "<a href="http://localhost/blog/" rel="nofollow noreferrer">http://localhost/blog/</a>" instead of just "<a href="http://localhost" rel="nofollow noreferrer">http://localhost</a>".</p>

CC BY-SA 3.0
2017-04-17T21:09:24.680Z
2017-04-17T21:09:24.680Z
Brad Bell
<p>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.</p>

<p>This video should show what happens.
<a href="https://gfycat.com/DemandingBitterGoldenmantledgroundsquirrel" rel="nofollow noreferrer">https://gfycat.com/DemandingBitterGoldenmantledgroundsquirrel</a></p>

<p>My index php looks like this:</p>

<pre><code>&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;
</code></pre>

<p>Could someone please advise me on how I can get the posts to upload correctly?</p>

CC BY-SA 3.0
2017-04-17T17:58:19.747Z
It seems to just be redirecting to localhost, instead of localhost/blog/ when I click on one of the links it directs to something like this:

localhost/index.php?p=news instead of localhost/blog/index.php?p=news
PKGrem
<entries><url>
When clicking blogposts it redirects me to localhost
# When clicking blogposts it redirects me to localhost

(Asked by: username_0 on 2017-04-17)

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:

$craftPath is set correctly in '.__FILE__);
}

require_once $path;

Could someone please advise me on how I can get the posts to upload correctly?

**Tags:** entries, url
> **Comments:**
> **username_0**: It seems to just be redirecting to localhost, instead of localhost/blog/ when I click on one of the links it directs to something like this:  localhost/index.php?p=news instead of localhost/blog/index.php?p=news  

---

## 2 answers

### Answer by username_1 on 2017-04-17. Score: 1

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

> **Comments:**
> **username_0**: I mean, I created the craftcms in a subfolder instead of the root, its in /blog/ instead of the public_html root, but now when I'm creating content it just redirects to the homepage instead of to the post when clicking on the link.  It seems to just be redirecting to localhost, instead of localhost/blog/ when I click on one of the links it directs to something like this: localhost/index.php?p=news instead of localhost/blog/index.php?p=news  

---

### Answer by username_2 on 2017-04-17. Score: 0

Make sure your "Site URL" setting in the control panel under Settings->General is set to "<http://localhost/blog/>" instead of just "<http://localhost>".


---

