# .htaccess 301 Weiterleitung Doppelter Content

**URL:** <https://forum.shopware.com/t/htaccess-301-weiterleitung-doppelter-content/32475>\
**Category:** Installation/Einstieg\
**Created:** [24. November 2015 um 08:30 UTC](https://forum.shopware.com/t/htaccess-301-weiterleitung-doppelter-content/32475 "2015-11-24T08:30:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdk-007](https://avatars.discourse-cdn.com/v4/letter/b/59ef9b/32.png) [@bdk-007](https://forum.shopware.com/u/bdk-007)\
**Post date:** [24. November 2015 um 08:30 UTC](https://forum.shopware.com/t/htaccess-301-weiterleitung-doppelter-content/32475/1 "2015-11-24T08:30:49Z")

</div>

Hallo zusammen, in Shopware5 greift meine Weiterleitung nicht. Normalerweise mach ich das so: `#Doppelten Content vermeiden, d.h. 301 Weiterleitung auf www RewriteCond %{HTTP\_HOST} ^meine-domain.de$ [NC] RewriteRule ^(.\*)$ http://www.meine-domain.de/$1 [R=301,L]` Der Eintrag soll immer auf [http://www](http://www). weiterleiten, egal ob man die Domain mit www. oder http:// eingibt. Das funktioniert aber bei Shopware nicht. Die .htaccess ist sonst die Standard-.htaccess aus Shopware 5.0.3. Kann mir dabei bitte jemand helfen? Viele Grüße Jan

---

<div class="post-metadata">

**Author:** ![simplybecause](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/simplybecause/32/7845_2.png) [@simplybecause](https://forum.shopware.com/u/simplybecause)\
**Post date:** [24. November 2015 um 13:45 UTC](https://forum.shopware.com/t/htaccess-301-weiterleitung-doppelter-content/32475/2 "2015-11-24T13:45:05Z")

</div>

Ich habe in der htaccess: `RewriteCond %{HTTP\_HOST} !^www\.domain\.de$ [NC] RewriteRule ^(.\*)$ http://www.domain.de/$1 [R=301,L]`

---

<div class="post-metadata">

**Author:** ![hth](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@hth](https://forum.shopware.com/u/hth)\
**Post date:** [24. November 2015 um 14:15 UTC](https://forum.shopware.com/t/htaccess-301-weiterleitung-doppelter-content/32475/3 "2015-11-24T14:15:10Z")

</div>

Hallo, ein Redirect in der htaccess von [http://www.shop-domain.de](http://www.shop-domain.de) auf [shop-domain.de](http://shop-domain.de) oder umgekehrt ist vollkommen unnötig! Shopware läuft nur unter einer Domain und sieht das www. als Bestandteil der Domain an. Ist die Shopdomain im Backend als [http://www.shop-domain.de](http://www.shop-domain.de) angegeben, setzt Shopware bei Aufruf von [shop-domain.de](http://shop-domain.de) (im Browser eingegeben) einen Redirect auf [http://www.shop-domain.de](http://www.shop-domain.de) . Einzige Ausnahme wären Links, die irgendwo im Internet ohne www existieren und die mit www auch noch aktuelle Links im Shop sind. Dann wäre ds nützlich. Viele Grüße HTH

---

<div class="post-metadata">

**Author:** ![simplybecause](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/simplybecause/32/7845_2.png) [@simplybecause](https://forum.shopware.com/u/simplybecause)\
**Post date:** [25. November 2015 um 13:46 UTC](https://forum.shopware.com/t/htaccess-301-weiterleitung-doppelter-content/32475/4 "2015-11-25T13:46:56Z")

</div>

Ja, aber das ist doch das Problem: der Shop leitet auf die Startseite weiter und behält den Ursprungslink nicht bei. Deshalb der Eintrag in der .htaccess.
