-
301 Redirect
- views 1325
Hi! I`ve combed through the entire Internet and can`t find the answer I need. Who can tell me what to do? Here`s my problem. My URL should be https://www.my-site.ru Here`s my question. Do I remove the old site from http to http: // www when going to HTTPS from www?
Logically, when switching to HTTPS, the site with http is no longer involved in the search. The site with HTTPS is a completely different resource - do we need the the old redirect anymore? Do we need to configure 301 redirect from http to https:// www?
1) Or do we leave the old splice from http to http:// www and make the second redirect from http to https since the www redirect already exists and automatically submits to https prefix www?
2) Or do I do a 301 redirect with http on https and then with https on https://www -?
What do I do? And can you write the code. Thank you in advance!!
Also, I have the following variant.RewriteEngine On RewriteCond %{REQUEST_FILENAME} !robots\\\\.txt RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTP_HOST} !^www\\\\.(.*) RewriteRule ^(.*)$ http://www.%1/$1 And is a gap between redirects necessary or each redirect begins with RewriteEngine On --?
Solutions (1)It will be better to perform redirection from http to https, and then, if necessary, from https://example.ru to https://www.example.ru. The "RewriteEngine On" directive is prescribed just once. Each redirect directive is placed on a separate line.There are no answers
Users (0) 0 of 5