Forum Moderators: Robert Charlton & goodroi
[edited by: not2easy at 5:33 am (utc) on Aug 30, 2018]
[edit reason] example.com for readability [/edit]
[edited by: Robert_Charlton at 5:32 am (utc) on Aug 30, 2018]
[edit reason] Delinked urls [/edit]
should I use
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mysite\.com$
RewriteRule ^/?$ "https\:\/\/mysite\.com\/blog\/" [R=301,L]
RewriteRule (.*) https://example.com/$1 [R=301,L] http://mysite.com/blog/2018/08/abc/
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mysite\.com$
RewriteRule ^/?$ "https\:\/\/mysite\.com\/blog\/" [R=301,L]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule (.*) https://example.com/$1 [R=301,L] Then any access to my page/post becomes very slow. I don't know why. Please let me know if there is anything wrong. Thx
Now my redirect rules in /public_html/.htaccessstill shows the escaped target:
"https\:\/\/mysite\.com\/blog\/"take those backslash escapes out of the target.
I also tried the one you said:
RewriteRule (.*) https://example.com/$1 [R=301,L]
Then any access to my page/post becomes very slow. I don't know why. Please let me know if there is anything wrong.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress in your htaccess file, it needs to be the last ruleset, after the domain rules. The domain rules should be just before that WP snippet. https://example.com/blog/ https://example.com/
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
RewriteRule (.*) https://example.com/$1 [R=301,L] http://example.com/blog/ becomes very slow. http://example.com/ is not working. RewriteRule ^/?$ "https\:\/\/example\.com\/blog\/" [R=301,L] http://example.com/blog did not pass the link weight to my HTTPS site, which affects my new SERP rankings. I saw some of my old http pages that rank in page 1 or 2 now move back to page 4 or 5.
Secondly, the direct access to http://example.com/ is not working.After you move to HTTPS, you should *not* leave access to HTTP page. A properly working redirect will point all requests for HTTP to HTTPS.
http://example.com/blogIf your redirect is working properly, the "link weight" will continue to your new HTTPS pages. It may take a few weeks.
did not pass the link weight to my HTTPS site
RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mysite\.com$
RewriteRule ^/?$ "https\:\/\/mysite\.com\/blog\/" [R=301,L] is giving you that result, my only concern then would be the headers that the server responds with at each step. Have you viewed the access logs to see the responses? Your connection is not secure
The owner of www.example.com has configured their website improperly. To protect your information from being stolen, Firefox has not connected to this website.
Learn more…
Report errors like this to help Mozilla identify and block malicious sites
It looks like they tried to switch to httpsDo you have evidence that the site in question thinks it's HTTPS? Is it a big enough site that it lives on its own server, so there would be no reason to listen on 443 unless it really is secure? Or is it one of those ecommerce situations where only the sensitive parts have gone HTTPS,* but they all live on the same server?
Do you have evidence that the site in question thinks it's HTTPS? Is it a big enough site that it lives on its own server
Sometimes it's 3-4 redirects before landing on https proper.If such a basic thing as domain-name-canonicalization or index redirect (when correctly done, it's two rules, but only one redirect) was ineptly coded, there's not a whole lot the rest of us can do to help ... except to hope the affected sites wise up and hire a marginally more competent administrator before browser error messages scare away all their business.