Knowledgebase

How to Redirect a Website or a Page Using htaccess

 

If you need to redirect visitors from a page that no longer exists to a new page or a different website, you can utilize the .htaccess file.

Redirect from a page or 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 one page to another page:

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

With this configuration, any visit to the URL example.com/oldpage.html will automatically redirect to example.com/newpage.html.

  • Redirect, redirection, https
  • 0 Users Found This Useful
Was this answer helpful?

Powered by WHMCompleteSolution