How to remove frontend/web from url in Yii2 advanced so that it doesn't appear when I use Url::to
问题 I have written .htaccess files to prevent frontend/web from appearing in url but when I saet links through Url::to it appears in url. This is my .htaccess in root directory: <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On </IfModule> <IfModule mod_rewrite.c> # deal with admin first RewriteCond %{REQUEST_URI} ^/(admin) RewriteRule ^admin/assets/(.*)$ backend/web/assets/$1 [L] RewriteRule ^admin/css/(.*)$ backend/web/css/$1 [L] RewriteCond %{REQUEST_URI} !^/backend/web/(assets