Forum Moderators: phranque
Again, give it time. If you have correctly installed the 301 to HTTPS and HTTP paths are no longer possible, indexing (including cache) will catch up eventually.
[edited by: not2easy at 3:06 pm (utc) on Jul 19, 2018]
[edit reason] moved/cleanup [/edit]
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html?\ HTTP/
RewriteRule ^(.*)index\.html?$ https://www.example.us/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^(www\.example\.us)?$
RewriteRule (.*) https://www.example.us/$1 [R=301,L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.us/$1 [R=301,L] is supposed to redirectTypo for index.html, I hope. My personal suggestion for an index redirect is:
example.us/index to
example.us/
which it still does.
RewriteCond %{REQUEST_URI} ^/((?:\w+/)*)index\.html
RewriteRule index\.html$ https://example.com/%1 [R=301,NS,L]
If you really have both html and htm, then use html? as in the first post of this thread. Otherwise the ? isn't needed. (For a wonder, search engines will not randomly try index.htm, only index.html.) If any of your URLs contain non-word characters, replace \w with [\w-] or whatever is appropriate. RewriteCond %{HTTPS} !on
just-in-case. But note also that this redirect has two conditions, separated by OR, because you're adding the new HTTPS redirect to your existing with/without www redirect to make a new improved canonicalization redirect. One rule, two Conditions, rather than two separate rules leading potentially to two separate redirects.
should go just above the "deny from"?In your current format, yes.
Options +FollowSymLinks
RewriteEngine On It was written long before they came onto the scene.Paradoxically, a very very very old site may be more mobile-friendly than a newer one. HTML is responsive by default. You have to go out of your way to code it not to be, for example by setting an explicit width of 2200px because of course all humans have windows at least that wide.