.htaccess - Rewrite specific sub domain to SSL based? -


i use apache 2 on debian 7.

i have online tool installed @ let's say:

tool.myurl.net 

i have wildcard ssl certificate for:

*.myurl.net 

i configured virtualhost in apache listen tool.anotherurl.com using serveralias.

but not have valid ssl certificate url.

so need rewrite rule redirect http://tool.myurl.net https://tool.myurl.net not when people visit http://tool.anotherurl.com.

is possible?

if understood correctly want redirect https sub domain tool.myurl.net rule should it:

rewriteengine on # if https not being used force https rewritecond %{https} !=on # because want force domain rewritecond %{http_host} ^tool\.myurl\.net$ [nc] rewriterule ^ https://%{http_host}%{request_uri} [l,r=301] 

Comments

Popular posts from this blog

Line ending issue with Mercurial or Visual Studio -

tags - Jquery Mixitup plugin help prevent handlers being destroyed -

c# - Delving into the world of XML (Windows Phone) Error I dont understand (The ' ' character, hexadecimal value 0x20, cannot be included in a name.) -