redirect to web folder


sorry I know this is a question several times answered, but after a few days I can’t solve the problem.

I need to publish my Yii2 application in a server with a Joomla previously installed.

The joomla .htaccess config file is causing me problems because every request is redirected from to

I have this folder tree in my apache server













.htaccess (for joomla)



I want that when the user writes the server redirects to my app. By now I can’t achieve it.

I’ve tried several .htaccess configurations.

My best try, was been create this .htacces under the web folder:

RewriteBase /

RewriteEngine on

RewriteCond %{REQUEST_URI} !^/web

RewriteRule ^(.*)$ web/$1 [L]

This configuration goes well but the problem is I must to write directly and I prefer to hide the /web part

Please, can someone help me?

Thank you.

Hi, have you found a good solution? Thank’s