<p>Ok I actually managed to fix this. I moved the index.php file from the cms/public subfolder to public_html and it worked a treat. I had to change the following code:</p>

<pre><code>// Path to your craft/ folder
$craftPath = '../craft';
</code></pre>

<p>to </p>

<pre><code>// Path to your craft/ folder
$craftPath = 'cms/craft';
</code></pre>

CC BY-SA 3.0
2017-12-04T10:37:22.960Z
2017-12-04T10:37:22.960Z
Matt
<p>I have created a Craft CMS site on a VPS Server running CentOS 7. I have a file setup on the public_html like this: -</p>

<ul>
<li>cms

<ul>
<li>craft</li>
<li>public</li>
</ul></li>
<li>app (this is running a Symfony Framework Web App and runs from app.example.com perfectly)</li>
</ul>

<p>Now I have the site working from www.example.com but when I login to the back office all of the links say... <a href="https://www.example.com/cms/public/admin/dashboard" rel="nofollow noreferrer">https://www.example.com/cms/public/admin/dashboard</a>. I want to remove cms/public from the URL links in the back office.</p>

CC BY-SA 3.0
2017-12-04T15:15:52.243Z
It sounds like you might need to do some URL rewriting with an .htaccess file or similar depending on your setup. Looks like this question might already have an [answer over here](https://craftcms.stackexchange.com/questions/13717/remove-subdirectories-from-admin-url-with-htaccess).
Cavell Blood
<url><redirect><install><htaccess><apache>
Installing Craft in a Sub Folder
# Installing Craft in a Sub Folder

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

I have created a Craft CMS site on a VPS Server running CentOS 7. I have a file setup on the public\_html like this: -

* cms
  + craft
  + public
* app (this is running a Symfony Framework Web App and runs from app.example.com perfectly)

Now I have the site working from www.example.com but when I login to the back office all of the links say... <https://www.example.com/cms/public/admin/dashboard>. I want to remove cms/public from the URL links in the back office.

**Tags:** url, redirect, install, htaccess, apache

> **Comments:**
> **username_1**: It sounds like you might need to do some URL rewriting with an .htaccess file or similar depending on your setup. Looks like this question might already have an [answer over here](https://craftcms.stackexchange.com/questions/13717/remove-subdirectories-from-admin-url-with-htaccess).  

---

## 1 answers

### Answer by username_0 on 2017-12-04. Score: 1 | Accepted answer

Ok I actually managed to fix this. I moved the index.php file from the cms/public subfolder to public_html and it worked a treat. I had to change the following code:
// Path to your craft/ folder
$craftPath = '../craft';

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


---

