main logo

How to redirect a page to another page or website using .htaccess?

How to redirect a page to another page or website using .htaccess?

redirect a page to another page or website using .htaccess

If a page on your website no longer exist and you want to redirect it to your new page or website then you can use the .htaccess file for redirection without waiting.

Redirect from a page/directory to another domain of website or the main domain:

Redirect from a specific page to a domain:
RewriteEngine on
Redirect 301 /mypage.html http://example.com

Redirect from a page to another page:
Redirect from a page/directory to another page
Redirect 301 /oldpage.html /newpage.html

Now, whenever you open the url example.com/oldpage.html, it will automatically redirect you to example.com/newpage.html.

Surya Reddy
Surya Reddy
Surya works at Medha Cloud and has been there for two years. He's an expert in his field, and besides helping customers as a Technical Support Engineer, he also shares his insights through blogs. Always curious, Surya keeps an eye on the latest tech to stay ahead.
Share
Contents

Related Articles

medhacloud logo
USA:
Medha Cloud Solutions LLC
30 N Gould St Ste R, Sheridan, WY 82801,
Phone: +1 646 775 2855

India:
Medha Cloud Solutions Private Limited
#74, 7th Cross, Krishna Garden InCity Layout. Chikka Kammanahalli, Banneraghatta Road, Bangalore 560083
Phone:+91 93536 44646

E-Mail: sales@medhahosting.com
©Medha Cloud 2024. All rights reserved.