# htaccess umleitung klappt nicht

**URL:** <https://forum.shopware.com/t/htaccess-umleitung-klappt-nicht/53893>\
**Category:** Allgemein\
**Created:** [5. Juli 2018 um 07:50 UTC](https://forum.shopware.com/t/htaccess-umleitung-klappt-nicht/53893 "2018-07-05T07:50:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike101](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@mike101](https://forum.shopware.com/u/mike101)\
**Post date:** [5. Juli 2018 um 07:50 UTC](https://forum.shopware.com/t/htaccess-umleitung-klappt-nicht/53893/1 "2018-07-05T07:50:12Z")

</div>

Hallo&nbsp;

hier meine htaccess datei (shopware Vers. 5.4.5) Es geht um die Weiterleitung des Ordners: Newsletter. Wenn ich mit dieser htacces den Ordner newsletter aufrufe, erscheint trotz Umleitung die Newsletterseite. Weiß jemand wo der Fehler liegt ?

```
RewriteEngine on

RewriteCond %{REQUEST_URI} ^(/newsletter)$
RewriteRule ^(.*)$ / [R=301,L]

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

#RewriteBase /shopware/

# Https config for the backend
#RewriteCond %{HTTPS} !=on
#RewriteRule backend/(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteRule shopware.dll shopware.php
RewriteRule files/documents/.* engine [NC,L]
RewriteRule backend/media/(.*) media/$1 [NC,L]

RewriteCond %{REQUEST_URI} !(\/(engine|files|templates|themes|web)\/)
RewriteCond %{REQUEST_URI} !(\/media\/(archive|banner|image|music|pdf|unknown|video)\/)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ shopware.php [PT,L,QSA]

# Fix missing authorization-header on fast_cgi installations
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

    # Block access to VCS directories
    RedirectMatch 404 /\\.(svn|git|hg|bzr|cvs)(/|$)

# Staging environment
#SetEnvIf Host "staging.test.shopware.in" SHOPWARE_ENV=staging

# Development environment
#SetEnvIf Host "dev.shopware.in" SHOPWARE_ENV=dev
#SetEnv SHOPWARE_ENV dev

DirectoryIndex index.html
DirectoryIndex index.php
DirectoryIndex shopware.php

# Disables download of configuration

    # Deny all requests from Apache 2.4+.
    
          Require all denied
    

    # Deny all requests from Apache 2.0-2.2.
    
        Deny from all
    

# Enable gzip compression

    AddOutputFilterByType DEFLATE text/html text/xml text/plain text/css text/javascript application/javascript application/json

    
        ExpiresActive on
        ExpiresDefault "access plus 1 month"
    

    
        Header append Cache-Control "public"
        Header unset ETag
    

    FileETag None

# Match generated files like:
# 1429684458_t22_s1.css
# 1429684458_t22_s1.js

    
        Header set Cache-Control "max-age=31536000, public"
    

    
        ExpiresActive on
        ExpiresDefault "access plus 1 year"
    

# Disables auto directory index

	Options -Indexes

    Options -MultiViews

# php_value memory_limit 256M
# php_value max_execution_time 120
# php_value upload_max_filesize 20M
   php_flag phar.readonly off
   php_flag magic_quotes_gpc off
   php_flag session.auto_start off
   php_flag suhosin.session.cryptua off
   php_flag zend.ze1_compatibility_mode off

# AddType x-mapp-php5 .php
# AddHandler x-mapp-php5 .php

    Header append X-Frame-Options SAMEORIGIN

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [5. Juli 2018 um 09:25 UTC](https://forum.shopware.com/t/htaccess-umleitung-klappt-nicht/53893/2 "2018-07-05T09:25:43Z")

</div>

Probier mal:

RewriteRule ^newsletter / [L,R=301]

&nbsp;

---

<div class="post-metadata">

**Author:** ![mike101](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@mike101](https://forum.shopware.com/u/mike101)\
**Post date:** [5. Juli 2018 um 09:31 UTC](https://forum.shopware.com/t/htaccess-umleitung-klappt-nicht/53893/3 "2018-07-05T09:31:55Z")

</div>

Perfekt !!

&nbsp;

Danke !!
