# htaccess -\> /public

**URL:** <https://forum.shopware.com/t/htaccess-public/71564>\
**Category:** Installation / Einstieg\
**Created:** [15. Dezember 2020 um 14:00 UTC](https://forum.shopware.com/t/htaccess-public/71564 "2020-12-15T14:00:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theexplainer](https://avatars.discourse-cdn.com/v4/letter/t/eada6e/32.png) [@theexplainer](https://forum.shopware.com/u/theexplainer)\
**Post date:** [15. Dezember 2020 um 14:00 UTC](https://forum.shopware.com/t/htaccess-public/71564/1 "2020-12-15T14:00:44Z")

</div>

Sorry Leute, ich kriegs echt nicht hin.

Meine htaccess im Rootverzeichnis soll:

1.) von http auf https umleiten

2.) das www entfernen

3.) auf das Verzeichnis public umleiten.

nach allen möglichen Fehlern habe ich nun eine Weiterleitung auf public/public/public/public/public/public/public/public/public/…

Wäre echt dankbar, wenn Ihr da eine Lösung für mich habt.

# leitet Adressen mit “www” auf Adresse ohne “www” um

RewriteCond %{HTTP\_HOST} ^www.xyz.at$  
RewriteRule ^(.\*)$ [http://xyz.at/$1](http://xyz.at/%241) [L,R=301]

# leitet Adressen ohne SSL auf Adresse mit SSL/https um

RewriteCond %{HTTP\_HOST} xyz.at$ [NC]  
RewriteCond %{HTTPS} off  
RewriteRule ^(.\*)$ [https://xyz.at/$1](https://xyz.at/%241) [L,R=301]

&nbsp;

soweit so gut. Aber die public Umleitung hinten dranhängen haut nicht hin

&nbsp;

danke
