Giving to wordpress it’s own directory cause login loop

…this is the .htaccess file inside the directory where wordpress is installed

That is certainly incorrect as it’s sending requests back to the root. You can remove the RewriteBase directive and remove the slash prefix on the RewriteRule substitution string, ie /index.php should be index.php.

For example:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>

# END WordPress

I’ve “commented out” the RewriteBase directive, rather than removing it completely.

By removing the slash prefix on the RewriteRule substitution then it is seen as relative to the current directory. ie. Relative to /web, so this rewrites the request to /web/index.php, not /index.php. (The RewriteBase directive would override this.)