Base Url problem

Hello,

after those lines in htaccess:


RewriteEngine on

RewriteCond %{HTTP_HOST} ^api\.esois\.eu$

RewriteCond %{REQUEST_URI} !api/

RewriteRule (.*) /api/web/$1 [L,PT]




RewriteCond %{HTTP_HOST} ^admin\.esois\.eu$

RewriteCond %{REQUEST_URI} !backend/

RewriteRule (.*) /backend/web/$1 [L,PT]

Both subdomains are working fine except URL’s go crazy. For example in backend all urls are like those:


backend/web/site/contact

backend/web/site/about

Do you have idea how to make them normal way site/about, site/contact

With API folder Yii2 rest rules are not working, probably reason is the same.

Any help is appreciated

I have found solution on YII wiki here http://www.yiiframework.com/wiki/755/how-to-hide-frontend-web-in-url-addresses-on-apache/

Thanks everybody.

(moderators can close topic, sorry for bothering you)