Hello There, Guest!  

How to permanently redirect a webpage to another one


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 

martin  

Junior Member


Posts: 12
Threads: 4
Joined: Jul 2017
Reputation: 0

#1
Hi everyone,

I want to redirect my webpage 

Code:
https://mydomain.com/page1.html


 to another webpage 

Code:
http://anotherdomain.com/page2.html



I heard .htaccess can do redirect, but how to implement it correctly?

Thanks!

thomas  

Junior Member


Posts: 17
Threads: 0
Joined: Jul 2017
Reputation: 0

#2
You can create a .htaccess file in the public_html of your original website, and put the following line in it


Code:
RedirectMatch 301 ^/page1\.html$ http://anotherdomain.com/page2.html

martin  

Junior Member


Posts: 12
Threads: 4
Joined: Jul 2017
Reputation: 0

#3
Thanks @thomas. It works
 
 
Forum Jump:

Users browsing this thread: 1 Guest(s)