An easier and quicker option (that has always worked for me) might be:
Virtualmin -> ‘System Settings’ --> ‘Virtualmin Configuration’ --> ‘SSL Settings’ —> Redirect HTTP to HTTPS by default?* -> Select “Yes” and then click “Save”.
It might be be a good idea to restart Apache as well as Webmin and then try your websites.
Thx: Rav
3 Likes
bitit
February 11, 2020, 10:17am
22
Don’t work for my old web sites, maybe for the new that will configure
enrico
bitit
February 11, 2020, 10:23am
23
the problem in this way for old web sites, that losing al the paths for web pages; this i right for new web sites, for old can be cause of website page rank losing .
i believe is important a solutions that guaranty the perfect redirects of any single pages .
Do you believe is possible fix it?
Enrico
gsmithe
February 11, 2020, 2:41pm
24
Enrico,
If I understand your question, yes any existing links should also redirect. Below is a photo amending my previous answer. Hope it helps, good luck.
GS
1 Like
bitit
February 11, 2020, 3:18pm
25
well maybe i have make some error i my configuration because in my test don’t work properly
for example: if i have a web site
http://www.website.url/second-page/
with this configurations that you show and i have tested, the redirect go to
https://www.website.url
and not in
https://www.website.url/second-page/
an this can be a big problem for SEO and page rank
with RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [R]
the redirect result seem pointed more correctly
obvious, if you starting a new web site you should not care about it; but for old sites is important