# Two PHP core on one hosting

**URL:** <https://discourse.cakephp.org/t/two-php-core-on-one-hosting/12006>\
**Category:** Need Help\
**Created:** [May 6, 2024, 10:58am UTC](https://discourse.cakephp.org/t/two-php-core-on-one-hosting/12006 "2024-05-06T10:58:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shadowx.jb](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shadowx.jb](https://discourse.cakephp.org/u/shadowx.jb)\
**Post date:** [May 6, 2024, 10:58am UTC](https://discourse.cakephp.org/t/two-php-core-on-one-hosting/12006/1 "2024-05-06T10:58:37Z")

</div>

I have one hosting, in root FTP one.

I created a new folder in the root of `/project`  
In the root `.htaccess` I edited the file like this

```auto
<IfModule mod_rewrite.c>
    RewriteEngine on

    RewriteCond %{HTTP_HOST} ^project\.domain\.com$
    RewriteCond %{REQUEST_URI} !^/project/
    RewriteCond %{DOCUMENT_ROOT}/project -d
    RewriteRule ^(.*)$ /project/$1 [L]

    RewriteRule ^(\.well-known/.*)$ $1 [L]
    RewriteRule ^$ webroot/ [L]
    RewriteRule (.*) webroot/$1 [L]
</IfModule>

```

If I call `project.domain.com`, the page is loaded, but if the link is in the page, it adds `/project/url` before the URL … how to set PHP Cake so that the folder name is not added to the URL?

It should behave as if I have a website in the root hosting.

Thank You

---

<div class="post-metadata">

**Author:** ![shadowx.jb](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shadowx.jb](https://discourse.cakephp.org/u/shadowx.jb)\
**Post date:** [August 8, 2024, 5:20pm UTC](https://discourse.cakephp.org/t/two-php-core-on-one-hosting/12006/2 "2024-08-08T17:20:48Z")

</div>

I created .htaccess on root server:

```auto
RewriteEngine On

RewriteCond %{HTTP_HOST} ^one\.phpcake$ [NC]
RewriteRule ^(.*)$ /one/$1 [L]

RewriteCond %{HTTP_HOST} ^two\.phpcake$ [NC]
RewriteRule ^(.*)$ /two/$1 [L]

```

Its works, but if request authorization, then redirect eg. url is:

```auto
https://one.phpcake/one/login

```

This url works: [https://one.phpcake/login](https://one.phpcake/login) but if in the page link to other, this href is [https://one.phpcake/one/password](https://one.phpcake/one/password)

How to solve it so that it doesn’t put `/one/` there?
