# How can we install shopware 6.5 on shared server and redirect all request to public/ directory

**URL:** <https://forum.shopware.com/t/how-can-we-install-shopware-6-5-on-shared-server-and-redirect-all-request-to-public-directory/99702>\
**Category:** Shopware 6 (English)\
**Tags:** general, programming\
**Created:** [15. Mai 2023 um 11:05 UTC](https://forum.shopware.com/t/how-can-we-install-shopware-6-5-on-shared-server-and-redirect-all-request-to-public-directory/99702 "2023-05-15T11:05:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitin33singh](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@nitin33singh](https://forum.shopware.com/u/nitin33singh)\
**Post date:** [15. Mai 2023 um 11:05 UTC](https://forum.shopware.com/t/how-can-we-install-shopware-6-5-on-shared-server-and-redirect-all-request-to-public-directory/99702/1 "2023-05-15T11:05:00Z")

</div>

Some of shared hosting provider doesn’t allow to change main document root (e.g. public\_html) to any other directory. In this case, How can we install shopware 6.5 on shared server and redirect all request to public/ directory. I have tried below redirect rule on root .htaccess but it’s not working.

```auto
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]

```

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [18. Mai 2023 um 15:06 UTC](https://forum.shopware.com/t/how-can-we-install-shopware-6-5-on-shared-server-and-redirect-all-request-to-public-directory/99702/2 "2023-05-18T15:06:49Z")

</div>

I would recommend to look for a different hosting provider.

In your case, it could work if you change the .htaccess of the main directory. But then all your URLs would contain public in the path. It is absolutely not recommended and it could be unsafe!!!
