Home Redirect wildcart subdomains to https
Reply: 0

Redirect wildcart subdomains to https

user528
1#
user528 Published in June 19, 2018, 6:27 pm

I want to reditect all wildcart subdomains to https and make a rewrite rule like this:

http://#.example.com => https://#.example.com => https://example.com/index.php?id=#

I have this code but it's not working and i'm not sure about the syntax.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTP_HOST} ^(.{2,})\.example.com$
RewriteRule (.*) https://example.com/index.php?id=%1 [P,L]
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.344804 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO