apache - .htaccess redirect https://domain1.com to https://domain2.com -


we have domain.com , domain.com.au pointing same website , have following in our .htaccess

rewriteengine on  rewritecond %{https} off rewriterule ^(.*)$ https://www.domain.com.au/$1 [r=301,l]  rewritecond %{https} on rewritecond %{http_host} !^www\.domain\.com\.au$ [nc]   rewriterule ^(.*)$ https://www.domain.com.au/$1 [r=301,l] 

this semi working redirect requests site correct secured url.

the issue when go https://domain.com warned browser first page may insecure - if accept warning page correctly redirects https://www.domain.com.au.

is there way prevent warning prior redirection of correct secured domain or should have .htaccess redirection written differently?


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -