I have several domains with the same subdomain, that may or not be accessed securely. I need to redirect every request that comes in from redirect.somesite.com to be redirected to a secure site. I need the original url, domain, and if the site was requested as secure or not.
http://redirect.site1.com/page?id=1
Redirects to
https://process.site4.com/page?id=3&domain=a.site1.com&secure=0
and
https://redirect.site2.com/page?id=2
Redirects to
https://process.site4.com/page?id=3&domain=a.site2.com&secure=1
and
http://redirect.site3.com/page?id=3
Redirects to
https://process.site4.com/page?id=3&domain=a.site3.com&secure=0
and
http://www.site3.com/page?id=3
Remains as
I assume you want the id query strings to match in the redirect?
Try this in your .htaccess file in your document root (or in your server/vhost config, change the
^page$regex to^/page$):The QSA at the last rule ensures that the ‘secure=’ and the original ‘id=’ query string parameters get tacked onto the URL.