Hallo liebe Shopware Community,
ich habe eine Frage bezüglich meiner .htaccess Datei - aus irgendeinem Grund funktionieren die 301 Weiterleitungen nicht. Mach ich da was falsch? Richtig platziert im Stammordner müsste die Datei sein, denn die Umleitung auf https klappt einwandfrei. Nur diese Weiterleitungen klappen nicht:
Redirect 301 /test/haartest/ https://www.mixmyshampoo.de/haartest
Redirect 301 /alle-kategorien/top-10-gefaehrliche-inhaltsstoffe-in-shampoos/ https://www.mixmyshampoo.de/top-10-gefaehrliche-inhaltsstoffe-in-shampoos
Redirect 301 /alle-kategorien/indisches-haaroel-selber-machen/ https://www.mixmyshampoo.de/haaroel-aus-indien-selber-machen
Redirect 301 /shampoo-gegen-spliss/ https://www.mixmyshampoo.de/shampoo-gegen-spliss-und-haarbruch
Anbei die ganze .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine on
#RewriteBase /
# Https config for the backend
#RewriteCond %{HTTPS} !=on
#RewriteRule backend/(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteRule shopware.dll index.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 ^(.*)$ index.php [PT,L,QSA]
Redirect 301 /test/haartest/ https://www.mixmyshampoo.de/haartest
Redirect 301 /alle-kategorien/top-10-gefaehrliche-inhaltsstoffe-in-shampoos/ https://www.mixmyshampoo.de/top-10-gefaehrliche-inhaltsstoffe-in-shampoos
Redirect 301 /alle-kategorien/indisches-haaroel-selber-machen/ https://www.mixmyshampoo.de/haaroel-aus-indien-selber-machen
Redirect 301 /shampoo-gegen-spliss/ https://www.mixmyshampoo.de/shampoo-gegen-spliss-und-haarbruch
# Fix missing authorization-header on fast_cgi installations
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>
<IfModule mod_alias.c>
# Block access to VCS directories
RedirectMatch 404 /\\.(svn|git|hg|bzr|cvs)(/|$)
</IfModule>
# 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 index.php
# Disables download of configuration
<Files ~ "\.(tpl|yml|ini)$">
# Deny all requests from Apache 2.4+.
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
# Deny all requests from Apache 2.0-2.2.
<IfModule !mod_authz_core.c>
Deny from all
</IfModule>
</Files>
# Enable gzip compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/xml text/plain text/css text/javascript application/javascript application/json
</IfModule>
<Files ~ "\.(jpe?g|png|gif|css|js|woff|eot)$">
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
</IfModule>
<IfModule mod_headers.c>
Header append Cache-Control "public"
Header unset ETag
</IfModule>
FileETag None
</Files>
# Match generated files like:
# 1429684458_t22_s1.css
# 1429684458_t22_s1.js
<FilesMatch "([0-9]{10})_(.+)\.(js|css)$">
<ifModule mod_headers.c>
Header set Cache-Control "max-age=31536000, public"
</ifModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 year"
</IfModule>
</FilesMatch>
# Disables auto directory index
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_php5.c>
# 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
</IfModule>
# AddType x-mapp-php5 .php
# AddHandler x-mapp-php5 .php
<IfModule mod_headers.c>
Header append X-Frame-Options SAMEORIGIN
</IfModule>
Vielen lieben Dank im Voraus!!
Liebe Grüße,
Lisa