Jump to content
Froxlor Forum
  • 0

How to correctly set up domain redirects in Froxlor?


willydee

Question

Posted

Hello,

I have a Froxlor installation up and running, which works fairly well: debian, latest froxlor, nginx, letsencrypt. But I'm still somehow struggling with how to correctly configure domain redirects.

Given are two domains: mydomain.tld and my-domain.tld. The content is to be served only under the URL https://my-domain.tld, for which a LetsEncrypt certificate is already in place. Needed are the following redirects, all targeting https://mydomain.tld:

How would I have to configure this?

Best regards,
Willy

4 answers to this question

Recommended Posts

Posted

www to non-www or vice versa -> best done manually in .htaccess

non-ssl to ssl -> edit domain -> ssl-redirect (but can also be handled by .htaccess if you want)

example of .htaccess

  ##
  # Uncomment the following lines to redirect requests without "www" to the correct domain.
  ##
  RewriteCond %{HTTPS} off
  RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
  RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

 

Posted

Then set the domain.com to "No Alias" in its settings, add www.domain.com as domain and let domain.com redirect to www.domain.com via froxlor

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...