SSL redirect for multiple subdomain

Alles, was den Apache betrifft, kann hier besprochen werden.

SSL redirect for multiple subdomain

Postby ElenaS » 30. October 2017 07:18

Hello everyone, I need help.

I have lots of subdomains that just had wild card SSL certificate installed and I need to write a wild card redirect code for .htaccess file to redirect following links to https://subdomain.domain.org

http://subdomain.domain.org
http://www.subdomain.domain.org
www.subdomain.domain.org

Thanks
ElenaS
 
Posts: 1
Joined: 30. October 2017 07:13
XAMPP version: 1.8.0
Operating System: Linux

Re: SSL redirect for multiple subdomain

Postby spline » 12. November 2017 19:43

HI,

should work with virtual hosts.

something like:

<VirtualHost *:80>
ServerName www.subdomain.domain.org
Redirect permanent / https://www.subdomain.domain.org/
</VirtualHost>

<VirtualHost *:80>
ServerName www.subdomain.domain.org
Redirect permanent / https://www.subdomain.domain.org
</VirtualHost>


Hope this helps

Jay
spline
 
Posts: 3
Joined: 12. November 2017 19:17
XAMPP version: 3,2,1
Operating System: debian


Return to Apache

Who is online

Users browsing this forum: No registered users and 5 guests