0

I want to achieve url rewrite as such:
https://documentation.domain.com/login to https://app.domain.com/login
https://api.domain.com/login to https://app.domain.com/login
, any sudomain with url {anything}.domain.com/login to https://app.domain.com/login

https://app.domain.com/sdks to https://documentation.domain.com/sdks (with all query parameters preserved)
https://api.domain.com/sdks to https://documentation.domain.com/sdks (with all query parameters preserved)
, any sudomain with url {anything}.domain.com/sdks to https://documentation.domain.com/sdks

https://app.domain.com/restApi to https://documentation.domain.com/restApi (with all query parameters preserved)
https://api.domain.com/restApi to https://documentation.domain.com/restApi (with all query parameters preserved)
, any sudomain with url {anything}.domain.com/restApi to https://documentation.domain.com/restApi

All above domains & sub domains are behind cloudflare with enabled SSL in mode Full Strict. How can I achieve this ? No matter what I do I always get "Too many redirects"

Certificate with key from cloudflare config (works):

ssl_certificate     /home/company/domain/ssl/push_node_cloudflare.pem;
ssl_certificate_key /home/company/domain/ssl/push_node_cloudflare_privatekey.key;

0

You must log in to answer this question.

Browse other questions tagged .