How to remove the web from url in yii2 xampp?

In the web folder lies like this .htaccess:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]


In the application root:

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule ^assets/(.*)$ /web/assets/$1 [L]
RewriteRule ^css/(.*)$ web/css/$1 [L]
RewriteRule ^js/(.*)$ web/js/$1 [L]
RewriteRule ^images/(.*)$ web/images/$1 [L]
RewriteRule (.*) /web/$1

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php


That's what gives if you remove the web from the url:

5dfde9bbdd084810554846.png

P. S: With the web in the url it works, how to do a proper redirect to the web folder?
April 3rd 20 at 18:54
1 answer
April 3rd 20 at 18:56
Solution
At the root of the application .htaccess
<IfModule mod_rewrite.c>
 Options +FollowSymlinks
 RewriteEngine on
</IfModule>

<IfModule mod_rewrite.c>
 RewriteCond %{REQUEST_URI} ^/.*
 RewriteRule ^(.*)$ web/$1 [L]

 RewriteCond %{REQUEST_URI} !^/web/
 RewriteCond %{REQUEST_FILENAME} !-f [OR]
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^.*$ web/index.php

</IfModule>

Find more questions by tags YiihtaccessXampp