0

I want to redirect

http://abc.one.com/mysettings/marks

to

https://xyz.two.com/mysettings/marks

I added below lines htaccess file but it doesn't seem to work. Please let me know where am I going wrong.

RewriteCond %{HTTP_HOST} ^http://abc.one.com/mysettings/marks [NC]
RewriteRule ^(.*)$ https://xyz.two.com/mysettings/marks [L,R=301]
Rizier123
  • 58,877
  • 16
  • 101
  • 156
Rumi
  • 229
  • 1
  • 13
  • possible duplicate of [.htaccess redirect http to https](http://stackoverflow.com/questions/13376219/htaccess-redirect-http-to-https) – altocumulus Sep 07 '15 at 08:53

2 Answers2

2

You can use;

RewriteCond %{HTTP_HOST} ^abc\.one\.com$ [NC]
RewriteRule ^mysettings/marks/?$ https://xyz.two.com/mysettings/marks [L,R=301]

Don't use URI in HTTP_HOST condition.

anubhava
  • 761,203
  • 64
  • 569
  • 643
1

Also use 301 redirect method. Because Redirect 301 /old-page.html http://www.example.com/new-page.html

Chirayu Vyas
  • 67
  • 11