ht a

Hallo,

ich bekomme die Umleitung aller adressen https://meinedomain.de auf https://wwww.meinedomain.de nicht hin und ich stehe echt auf dem Schlauch. Kann mir jemand helfen ?

 

<ifmodule mod_rewrite.c>
RewriteEngine on

#RewriteBase /shopware/

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

#### MEINS #####
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]

### Depre ####
#RewriteCond %{HTTPS} off
#RewriteCond %{HTTP:X-Forwarded-Proto} !https
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

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]
</ifmodule><ifmodule mod_alias.c>
    # Block access to VCS directories
    RedirectMatch 404 /\\.(svn|git|hg|bzr|cvs)(/|$)

    # Restrict access to root folder files
    RedirectMatch 404 /(composer\.(json|lock)|README\.md|UPGRADE\.md)$
</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 shopware.php # Disables download of configuration <files>
    # 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>
        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>
    <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>
    <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
   php_value always_populate_raw_post_data -1
</ifmodule> # AddType x-mapp-php5 .php # AddHandler x-mapp-php5 .php <ifmodule mod_headers.c>
    Header append X-Frame-Options SAMEORIGIN
</ifmodule>

 

 

Hey,

ich habs jetzt auch nicht so im kopf aber versuchs mal damit:

RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule ^(.*) http://www.example.com/$1 [R=301]

Quelle: https://stackoverflow.com/a/4159124

 

Ggf. musst du das ganze für https: auch machen.

 

VG

1 „Gefällt mir“