Knowledgebase
- Portal Home
- Knowledgebase
- Others
- How to redirect a page to another page or website using .htaccess?
Categories
4
Backup/Restore
26 Basics of cPanel (Videos)
3 Control Panel
25 cPanel - Control Panel
11 cPanel Database Tutorials (Videos)
10 cPanel Domain Management (Videos)
5 cPanel Email (Videos)
4 cPanel FTP (Videos)
11 Databases
6 DNS - Nameservers
10 Domain Management
2 Domain/Transfer Managemet
11 Email
9 FTP
0 Getting Started
2 Installing a Control Panel
8 Mail Filters & SPAM
11 Mobile
3 Others
10 Security
76 Softaculous
5 SSL
1 Using the Client Portal
18 WHM
17 WordPress
Categories
If a page on your website no longer exists and you want to redirect it to your new page or site, 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.
- 0 Users Found This Useful
Related Articles
PHP error: Allowed memory size of x bytes exhausted
If you are getting an error like "Allowed memory size of... in file...
How to create a user-friendly URL using .htaccess?
If your website is using long URL like example.com/files/folder/sitemap.html, you can change it...