HTTS site redirect, excluding images
3 posts
• Page 1 of 1
HTTS site redirect, excluding images
Hi, Yaroslav
I need to set up a redirect from http оn https version of the site, excluding images.
According to Yandex.Images requirements images should be available on both the protocol version.
Please help with the settings redirection rules
PS Happy New Year!
I need to set up a redirect from http оn https version of the site, excluding images.
According to Yandex.Images requirements images should be available on both the protocol version.
Please help with the settings redirection rules
PS Happy New Year!
Re: HTTS site redirect, excluding images
Also, I noticed a strange interpretation of the directive
RewriteCond% {HTTPS} on [NC] -- not work
RewriteCond% {HTTPS} =on -- work !
# win 2012R2 iis 8.5, isapi 3.x.112
RewriteCond% {HTTPS} on [NC] -- not work
RewriteCond% {HTTPS} =on -- work !
# win 2012R2 iis 8.5, isapi 3.x.112
Re: HTTS site redirect, excluding images
My answer to myself
- Code: Select all
# Permanent redirection from http to https protocol except /upload/ files of images
RewriteCond %{HTTPS} =off [NC]
RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/upload/.*\.(gif|jpe?g|png)$ [NC]
RewriteRule ^(.*)$ https://mydomain.com/$1 [NC,R=301]
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests