Asked by
Brian Miller,
By flynempire,
By Good Bot, Bad Bot · Posted
By +sphbecker · Posted
By Neonix1 · Posted
By seta-san · Posted
We rely on ads to keep creating quality content for you to enjoy for free.
Please support our site by disabling your ad blocker.
Continue without supporting us
If the prompt is still appearing, please disable any tools or services you are using that block internet ads (e.g. DNS Servers, tracking protection or privacy extensions).
Question
Brian Miller
Can someone help me with redirecting a domain name to the HTTPS version of itself? I've seen many examples online but none of them seems to fit my specific requirements.
I think I need multiple "if" conditions that will redirect any non-"https://www" queries to the "https://www" version of itself.
Below is the 301 redirection options I need to include in the .htaccess file:
From the above table, you'll notice that I need at least 3 condition checks within my single .htaccess file. Also, as I'm using the same .htaccess file in my localhost as well as on my public web site, the "if" conditions will also need to accommodate localhost as well.
I can only test for either A, B or C from the list above. I can't test a combination of all of them.
Please can a kind Neowin expert assist me?
Thank you.
Link to comment
https://www.neowin.net/forum/topic/1354088-help-with-domain-name-and-ip-redirection/Share on other sites
9 answers to this question
Recommended Posts