qclass Posted February 1, 2020 Posted February 1, 2020 (edited) How can I force redirect webmail.galactico.fashion to https://webmail.galactico.fashion My server is : Johnny Edited February 1, 2020 by qclass
Sn1F3rt Posted February 1, 2020 Posted February 1, 2020 Go to the folder of your subdomain, and create a file named .htaccess and paste the following content into the file: IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://webmail.galactico.fashion/$1 [R,L] </IfModule> That's redirect all HTTP requests on the subdomain to https. Hope that helps!
qclass Posted February 1, 2020 Author Posted February 1, 2020 Go to the folder of your subdomain, and create a file named .htaccess and paste the following content into the file: IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://webmail.galactico.fashion/$1 [R,L] </IfModule> That's redirect all HTTP requests on the subdomain to https. Hope that helps! Everything (e.g. xxx) gets redirected to https://webmail.galactico.fashion/xxx
Krydos Posted February 2, 2020 Posted February 2, 2020 I recommend adding an exception for the .well-known directory to allow ssl to be renewed in the future: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteCond %{REQUEST_URI} !^/.well-known/ [NC] RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now