Hallo,
ich brauch bitte htaccess-Hilfe.
Auf einem gedruckten Gutschein wird folgende URL kommuniziert: domain.de/gutschein
Die URL wo man hinsoll lautet allerdings https://domain.de/gutschein.html
Ich möchte also einen entsprechenden Rewrite in meiner htaccess hinzufügen.
Innerhalb meiner htaccess habe ich bereits die Umleitung von http auf https integriert (die auch funktioniert).
Hier meine htaccess ... mit dieser erhalte ich aktuell bei Aufruf von domain.de/gutschein den Fehler "to many redirects".
Danke für Hilfe.
Code:
<IfModule mod_headers.c>
# Allow access from all domains for webfonts (see contao/core-bundle#528)
<FilesMatch "\.(ttf|ttc|otf|eot|woff2?|font\.css)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://domain.de/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^domain\.de$ [NC]
RewriteRule ^gutschein /gutschein.html [R=301,L]
# Determine the RewriteBase automatically and set it as environment variable.
# If you are using Apache aliases to do mass virtual hosting or installed the
# project in a subdirectory, the base path will be prepended to allow proper
# resolution of the app.php file and to redirect to the correct URI. It will
# work in environments without path prefix as well, providing a safe, one-size
# fits all solution. But as you do not need it in this case, you can comment
# the following 2 lines to eliminate the overhead.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
[...gekürzt...]
Lesezeichen