locked Posted May 28, 2017 Posted May 28, 2017 I have an SSL certificate installed on my domain (both example.heliohost.org and example.tk, and variants), and would like to make it so that users going to http://example.tk are redirected to https://example.tk. I am currently using mod_rewrite inside .htaccess to make this work, but every post I can find on this online says this is a last resort and that using apache virtualhosts is much better. The problem is, I have no idea where the necessary apache configuration files are located, if I need to create them, or if I even have access to them. Or, should I use cPanel's redirects along with a wildcard instead? Some other method? Thanks for any help. Edit: Also, I'm on Ricky, if that helps.
Krydos Posted May 28, 2017 Posted May 28, 2017 Just use .htaccess. Even I don't really have access to virtualhosts. Cpanel gets very angry at me when I mess with httpd.conf.
locked Posted May 28, 2017 Author Posted May 28, 2017 Okay, thanks! My current .htaccess rule is below, does it look good to you? RewriteEngine OnRewriteCond %{HTTPS} !=onRewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now