Access to /backend subdirectory with apache 2.4 mod_rewrite and access rules

Hello,

we restricted access to /backend via apache access control (Location) within vhost config.

now we ve the problem to open /backend/export/index/ to the world.
i tried different combos in the vhost config

LocationMatch with excluded Subdirectory and SetEnvIf Request_URI, but the access is still restricted.

 

I read about, that i need to commit the apache env via rewrite, but no success

e.g. i put this before the common Rewrite for shopware.php in the .htaccess.

 RewriteCond %{REQUEST\_URI} ^/backend/export/index/ RewriteRule ^(.\*)$ shopware.php [E=allow\_uri:1,PT,L,QSA]

result in:  Invalid URI in request GET.

Maybe i m following the wrong course, is anyone here with fresh ideas? Thank you :slight_smile:

I can provide any configuration if needed.

Regards, Patrick