Redirect Main domain and subdomain from http to https
2
votes
1
answer
4891
views
i want to redirect these sub domains and main domain from http to https and sub blogs too.
**Home directories**
- WWW (Wordpress):
/home1/placehq5/public_html/.htaccess
- My Somadome (PHP): /home1/placehq5/public_html/my
- Kiosk site (HTML): /home1/placehq5/public_html/kiosk
Webserver is Apache version 2.2.31 (on Linux)
please correct this htaccess file.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://somadome.com/$1 [L,R=301]
RewriteCond %{SERVER_PORT} 443
RewriteCond %{HTTP_HOST} ^www[.].+$
RewriteRule ^(.*)$ https://somadome.com/$1 [L,R=301]
in this picture first column is how my urls are right now, 2nd column is what i want after htaccess rules, 3rd coulmn is what iam getting after applying these rule below:-

Asked by Navdeep.D2
(35 rep)
May 8, 2017, 07:36 PM
Last activity: Jun 30, 2025, 06:05 PM
Last activity: Jun 30, 2025, 06:05 PM