wild card redirects for https
- TheButcher
- Administrator

- Posts: 17530
- Joined: February 2nd, 2018, 11:48 am
- Title: I like weekends
- Referrals: 1
- Contact:
wild card redirects for https
Hi guys
So the domain sponsorchat.com has an SSL certificate, and I have htaccess configured to redirect any 404 or subdomain to
https://www.sponsorchat.com
For example
http://w.sponsorchat.com/ redirects to https://www.sponsochat.com
It's been this way for years.
BUT I just noticed that if you type in a subdomain that is https: for example https://w.sponsorchat.com/ it does not redirect correctly, what is the fix.
Peace
So the domain sponsorchat.com has an SSL certificate, and I have htaccess configured to redirect any 404 or subdomain to
https://www.sponsorchat.com
For example
http://w.sponsorchat.com/ redirects to https://www.sponsochat.com
It's been this way for years.
BUT I just noticed that if you type in a subdomain that is https: for example https://w.sponsorchat.com/ it does not redirect correctly, what is the fix.
Peace
-
DeSexGuide
- Verified Member

- Posts: 1842
- Joined: May 4th, 2018, 6:51 pm
-
Austin
- Verified Member

- Posts: 543
- Joined: July 13th, 2018, 6:30 pm
- Referrals: 1
Tried to modify my htaccess to do a redirect from one subdomain to another where both are https:// and it did not work. Guessing you can not redirect https:// subdomains.
-
Colmike7
- Banned

- Posts: 1670
- Joined: May 23rd, 2018, 12:21 pm
- Title: (>^-^)b
Yep. Either that or set up a cert for each subdomain used.
- TheButcher
- Administrator

- Posts: 17530
- Joined: February 2nd, 2018, 11:48 am
- Title: I like weekends
- Referrals: 1
- Contact:
Okay let me explain it a little more, when i check the incoming hits, there are thousands of hits to subdomains that are not there any more, I don't want to go setup 20 subdomains for no reason when there won't be a site on them. But it would be good to redirect the subdomains to the rot of the domain. It works fine for non-ssl subdomains, but not for ssl subdomains.
example https://www.lesbians.sponsorchat.com gets close to 3K hits a day
Peace
example https://www.lesbians.sponsorchat.com gets close to 3K hits a day
Peace
-
brt22
- Verified Member

- Posts: 316
- Joined: November 24th, 2018, 3:30 pm
Not a programmer type but my thinking is htaccess would be able to handle this.
-
Colmike7
- Banned

- Posts: 1670
- Joined: May 23rd, 2018, 12:21 pm
- Title: (>^-^)b
No, because the SSL cert is checked before the HTTP session.
Either get a wildcard cert, which costs some money, or see if your host provides SANs (Subject Alternate Name). Some hosts offer like 4, some offer about 20, each host is different and not all are free, either.
-
Cumslut
- Verified Member

- Posts: 462
- Joined: October 24th, 2018, 5:59 am
Just asking colmike7, on htaccess does it matter where you out the various directives. I mean do you have to put certain codes on top or first on the page?Colmike7 wrote: ↑April 18th, 2020, 12:56 pmNo, because the SSL cert is checked before the HTTP session.
Either get a wildcard cert, which costs some money, or see if your host provides SANs (Subject Alternate Name). Some hosts offer like 4, some offer about 20, each host is different and not all are free, either.
-
Colmike7
- Banned

- Posts: 1670
- Joined: May 23rd, 2018, 12:21 pm
- Title: (>^-^)b
Order can make a difference, sometimes it doesn't matter. Let me wake up a bit and I'll explain lol.Cumslut wrote: ↑April 19th, 2020, 8:10 amJust asking colmike7, on htaccess does it matter where you out the various directives. I mean do you have to put certain codes on top or first on the page?Colmike7 wrote: ↑April 18th, 2020, 12:56 pmNo, because the SSL cert is checked before the HTTP session.
Either get a wildcard cert, which costs some money, or see if your host provides SANs (Subject Alternate Name). Some hosts offer like 4, some offer about 20, each host is different and not all are free, either.
- jag
- Verified Member

- Posts: 6539
- Joined: February 15th, 2018, 9:51 am
- Title: From Malta with love
- Referrals: 1
I know some codes work best on top of the page just at the start of the <head> tags, never come across the positioning of the code being important in htaccess, I'll wait for clarification from colmike7.
From Malta with love and sunshine
-
Kathy_T
- Verified Member

- Posts: 52
- Joined: February 11th, 2019, 5:33 pm
If only I knew programming
- bestfreeporn
- Verified Member

- Posts: 2308
- Joined: February 20th, 2018, 6:34 pm
- Referrals: 1
It is not all that difficult to learn, just look at a php file, you'll start noticing things, how I do it.
-
urbanlegend
- Verified Member

- Posts: 1471
- Joined: March 23rd, 2018, 10:13 am
did you get a chance to think this one thru?
- viking
- Verified Member

- Posts: 1420
- Joined: March 18th, 2018, 8:28 pm
-
monsta
- Verified Member

- Posts: 1459
- Joined: March 21st, 2018, 3:37 pm
Wonder why they give a single domain ssl for free but not for subdomians