ich habe ein kleines Problem und hoffe auf eure Unterstützung.
Ich möchte für meine Seite nun ein SSL Zertifikat nutzen. Alles was das Zertifikat
betrifft inkl. einbindung ist Erledigt.
Info: ich nutze das AMR Plugin
Nun möchte ich aber erreichen, dass man meine Seite mit und ohne https aufrufen
kann. Derzeit werden über die htaccess alle Aufrufe nach folgendem Schema
mit mod_rewrite umgeleitet:
Code: Alles auswählen
RewriteCond %{HTTP_HOST} ^meinedomain\.de$ [NC]
RewriteRule ^(.*)$ http://www.meinedomain.de/$1 [R=301,L]
weiterhin immer auf die Variante mit www. umgeleitet werden soll, aber die freie
wahl zwischen http und https bestehen soll?
Ich nutze derzeit folgende .htaccess:
Code: Alles auswählen
###############################################################################
# Contenido AMR plugin simple rewrite rules set
#
# Contains few easy to handle rewrite rules
#
###############################################################################
# Enable following lines to run PHP5 on 1und1.de (1and1.com)
# ----------------------------------------------------------
#AddType x-mapp-php5 .php
#AddHandler x-mapp-php5 .php
<IfModule mod_rewrite.c>
# Enable rewrite engine
# ---------------------
RewriteEngine on
# This will enable the Rewrite capabilities
RewriteCond %{HTTP_HOST} ^meinedomain\.de$ [NC]
RewriteRule ^(.*)$ http://www.meinedomain.de/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^anderedomain.de$ [NC]
RewriteRule ^(.*) http://www.meinedomain.de/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^www.anderedomain.de$ [NC]
RewriteRule ^(.*) http://www.meinedomain.de/$1 [L,R=301]
# Specify a base URL-path for the rules
# -------------------------------------
RewriteBase /cms
# Catch some common exploits in query string to get rid of them
# NOTE: Conditions to prevent protocolls (ftp, http[s]) in query string could be a
# disadvantage in some cases
# --------------------------------------------------------------------------------
RewriteCond %{QUERY_STRING} contenido_path=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} cfg\[path\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} _PHPLIB\[libdir\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR]
RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC]
RewriteRule ^.* - [F,L] # all matching conditions from above will end in nirvana
# Rewrite request to root to front_content.php
# --------------------------------------------
RewriteRule ^$ front_content.php [QSA,L]
# Exclude following request from rewriting
# tests for valid symlinks (-s), not empty files (-l) and folders (-d)
# --------------------------------------------------------------------
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# Pass other requests to front_content.php
# ----------------------------------------
RewriteRule ^.*$ front_content.php [QSA,NC,L]
</IfModule>
csandro