Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have several domains for my page: https://www.mypage.es, https://www.mypage.it.... Now I'm trying to redirect just my french domain https://www.mypage.fr to https://www.mypage.com. So I have tried this:

RewriteCond %{SERVER_PORT} ^443$
RewriteRule https://www.mypage.fr$ https://www.mypage.com/$1 [R=301,L]

but doesn't redirect...

NOTE: This redirects ok:

RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$ http://www.mypage.com/$1 [R=301,L]



share|improve this question

1 Answer 1

up vote 0 down vote accepted


RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{HTTP_HOST} ^www\.mypage\.fr
RewriteRule ^$ https://www.mypage.com [R=301,L]
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{HTTP_HOST} ^www\.mypage\.fr
RewriteRule (.*) https://www.mypage.com$1 [R=301,L]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.