/    Sign up×
Community /Pin to ProfileBookmark

So I am stuck

I have a redirect for port 80 traffic to redirect to https version of the site. so all the site is on https

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]

All pages redirect to correct version on https.

NOW I want to change domain to dom-ain.com but I am stuck on how to redirect to this new https domain possibly non https at first.

I have back links on the web to the non https version and https version of domain.com

What should the htaccess code be if I want the site to redirect to the new domain now and I plan to keep it an exact replica in structure and content.

to post a comment
Full-stack Developer

2 Comments(s)

Copy linkTweet thisAlerts:
@jedaisoulOct 18.2015 — Hi and welcome to the site. Hopefully someone familiar with your problem will reply soon...
Copy linkTweet thisAlerts:
@samkatauthorOct 19.2015 — I hope so too
×

Success!

Help @samkat spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...