ich jede Seite über https
mit einer Regel bin Laden wie in .htaccess
einige Verzeichnisse ausschließen, während auf https umgeleitet
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
folgt Ich brauche jede Seite in der Website umleiten über https
Protokoll mit Ausnahme einiger Verzeichnisse zu laden. Ich habe versucht, mit dieser Regel
RewriteRule ^dont-load-under-https-folder/ - [L,NC]
Aber es ist noch zu diesen dont-load-under-https-folder
Hier mein ganzer .htaccess-Code ist
IndexIgnore *
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTP_HOST} ^52\.76\.80\.144$
RewriteRule ^(.*)$ https://mywebsite.com/$1 [L,R=301]
RewriteRule ^http://52.76.80.144//(.*)$ /$1 [R=301,NC,L]
## don't touch /forum URIs
RewriteRule ^forums/ - [L,NC]
RewriteRule ^detector/ - [L,NC]
RewriteRule ^admin/ - [L,NC]
RewriteRule ^b2b/ - [L,NC]
RewriteRule ^blog/ - [L,NC]
RewriteRule ^config/ - [L,NC]
RewriteRule ^hub/ - [L,NC]
# To remove www header
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule^http://%1%{REQUEST_URI} [L,R=301,NE]
RewriteCond %{THE_REQUEST} /(\w+)\.php\?param=([^\s&]+) [NC]
RewriteRule^%1/%2? [R=301,L,NE]
## hide .php extension snippet
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule^%1 [R=301,NE,L]
# handle ?param=...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/$1\.php -f
RewriteRule ^(.+)/([\w-]+)/?$ $1.php?param=$2 [L,QSA]
# To internally forward /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]
RewriteRule ^ending/thankyou(.*?)/?$ $1.php [L]
RewriteCond %{THE_REQUEST} /main\.html[\s?] [NC]
RewriteRule ^main\.html$/[L,R=301,NC]
RewriteRule ^/?$ main.html [L]
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# Or, compress certain file types by extension:
<files *.html>
SetOutputFilter DEFLATE
</files>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>
<IfModule mod_headers.c>
# WEEK
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
# WEEK
<FilesMatch "\.(js|css|swf)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
</IfModule>
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
</IfModule>
<IfModule mod_expires.c>
AddType font/ttf .ttf
AddType font/otf .otf
AddType font/x-woff .woff
AddType image/svg+xml .svg
AddType application/vnd.ms-fontobject .eot
ExpiresActive on
ExpiresByType image/jpg "access 2 month"
ExpiresByType image/gif "access 2 month"
ExpiresByType image/jpeg "access 2 month"
ExpiresByType image/png "access 2 month"
ExpiresByType text/css "access 2 month"
ExpiresByType application/x-javascript "access plus 2 month"
ExpiresByType text/javascript "access plus 2 month"
ExpiresByType application/javascript "access plus 2 month"
ExpiresByType image/x-icon "access plus 12 month"
ExpiresByType image/icon "access plus 12 month"
ExpiresByType application/x-ico "access plus 12 month"
ExpiresByType application/ico "access plus 12 month"
ExpiresByType font/ttf "access plus 12 month"
ExpiresByType font/otf "access plus 12 month"
ExpiresByType application/vnd.ms-fontobject "access plus 12 month"
ExpiresByType font/x-woff "access plus 12 month"
ExpiresByType image/svg+xml "access plus 12 month"
</IfModule>
aus Ihrer Frage Es ist nicht klar, was/wo genau das Problem ist. Bitte posten Sie Ihre volle Htaccess – starkeen
@starkeen Überprüfen Sie meine Htaccess-Code –
Ihre Regeln sind nicht in der richtigen Reihenfolge. Setzen Sie # Dires-Regeln vor den https-Umleitungsregeln nicht berühren. – starkeen