Subdomain Redirect To HTTPS using .htaccess
-
I was not able to find it anywhere on the internet so I decided to post it here in these forums.
To redirect your domain/subdomain to HTTPS Ex:-
http://techrax.tk => https://techrax.tk
OR
http://news.techrax.tk => https://newstechrax.tkYou need to edit your domain/subdomain’s .htaccess or create a new one if its not there. Then add the following lines to the top of it.
# BEGIN HTTPS <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> # END HTTPS
- The topic ‘Subdomain Redirect To HTTPS using .htaccess’ is closed to new replies.