How to 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 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.

  • 49 Users Found This Useful
Was this answer helpful?

Related Articles

How can I change my PHP version?

You can easily select the PHP version most compatible with your site by logging into your cPanel...

Help my site is down, why cant I load my website?

Wait, hold on a sec! Do not panic!   Please go through this check list before contacting us, if...

I've updated my domain's nameservers but my site still does not come up, How come?

Once you update your name servers (DNS) for your domain, it can take anywhere from a few hours to...

Do you block any ports?

Our firewalls block all inbound and outbound non-standard ports, if your application is having...

What is the difference between parked, addon, and subdomains?

An addon domain is a fully functional domain that can be created from your cPanel control panel....