# Access to /backend subdirectory with apache 2.4 mod\_rewrite and access rules

**URL:** <https://forum.shopware.com/t/access-to-backend-subdirectory-with-apache-2-4-mod-rewrite-and-access-rules/60334>\
**Category:** Installation/Einstieg\
**Created:** [8. Juli 2019 um 11:52 UTC](https://forum.shopware.com/t/access-to-backend-subdirectory-with-apache-2-4-mod-rewrite-and-access-rules/60334 "2019-07-08T11:52:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrickschmidt](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/patrickschmidt/32/15670_2.png) [@patrickschmidt](https://forum.shopware.com/u/patrickschmidt)\
**Post date:** [8. Juli 2019 um 11:52 UTC](https://forum.shopware.com/t/access-to-backend-subdirectory-with-apache-2-4-mod-rewrite-and-access-rules/60334/1 "2019-07-08T11:52:18Z")

</div>

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.

&nbsp;

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:&nbsp; Invalid URI in request GET.

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

I can provide any configuration if needed.

Regards, Patrick
