Http с www is не перенаправляет на htpps www - PullRequest
0 голосов
/ 24 января 2020

Теперь http с www urls не перенаправляет на https://www. URL Http (без www) перенаправляет на https://www С http: // без www is, правильно перенаправляя на https://www. Но http с www is, не перенаправляющим на https www Below, - мой код htaccess:

<Files ~ "\.log$"> 
Order allow,deny
Deny from all
</Files>
+FollowSymlinks
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP:VIA}                 !^$ [OR]
RewriteCond %{HTTP:FORWARDED}           !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA}       !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR}     !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION}    !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION}   !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP}      !^$
RewriteRule ^(.*)$ - [F]
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} anonymous [NC]
RewriteRule ^.* - [F,L]
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php
ErrorDocument 403 /403.shtml
<IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine on
#RewriteCond %{REQUEST_URI} !/themes/default/(.*)
#RewriteCond %{REQUEST_URI} \.(jpg|gif|png|ico)$ [NC]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{DOCUMENT_ROOT}/themes/PARENT_THEME/$2 -f
#RewriteRule ^themes/([^/]+)/(.*)$ themes/PARENT_THEME/$2
RewriteCond %{REQUEST_URI} \.(jpg|gif|png|ico)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^themes/([^/]+)/(.*)$ themes/default/$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*\.js) combine.php?type=javascript&files=$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
#RewriteRule ^(.*)$ index.php/$1 [L]
RewriteRule ^(.*)$ ./index.php [L]
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IfModule>
AuthUserFile "/home/garry/.htpasswds/public_html/www.exam.com/passwd"
<IfModule mod_headers.c>
<FilesMatch "\.(js|css|xml|gz)$">
Header append Vary: Accept-Encoding
</FilesMatch>
</IfModule>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...