Einzelnen Beitrag anzeigen

amigage

Registriert seit: 11. Nov 2005
Ort: Leipzig
270 Beiträge
 
Delphi 11 Alexandria
 
#3

AW: .htaccess: Problem bei Rewrite Conditions

  Alt 9. Mär 2017, 12:42
Vielen Dank für den Link.

Die Lösung ist simpel:
Delphi-Quellcode:
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTPS} off
  RewriteCond %{REQUEST_URI} !special\.php
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
Das Problem war, dass mein Browser aufgrund von R=302 die Aufrufe gecached hat und somit den http Aufruf immer auf https umgeleitet hat.

Der Hinweis unter http://stackoverflow.com/questions/7...rewrite-script hat mich zum Ziel geführt.

Zitat:
If you need to do 301 (permanent) redirects -- do 302 instead during a testing period (until you are happy with the rule and results -- then change to 301) as modern browsers do cache 301 redirects .. so you may end up in frustrating situation when you have completely changed the rule (or even deleted it) but browser still do redirects. The only cure in such case -- clear browser cache and restart.
  Mit Zitat antworten Zitat