Setting up a web page redirection in Linux cPanel

Setting up a web page redirect is really easy. The simplest way would be to just to do it through your cPanel. You can also do it by editing your .htaccess file in the directory you are working in.


How to set up a cPanel redirect


1. Log into your cPanel, and look for "Redirects" under Domains




2. Put in the current directory into the first box

3. Put the new directory in the second box

4. Choose the type (temporary or permanent)

5. Click "Add" and you're done!


To remove it, just choose on the same screen to remove it and you're good as gold! It's just that easy!

How to set up a .htaccess redirect


CODE
Redirect 301 /example/test.html
http://www.yoursite.com/newlocation/newpage.html


Cut and paste this code into your .htaccess file. "Redirect 301" means that it is a permanent redirect. You can change it to "Redirect 302" for a temporary redirect. If you have no number, then it will default to a temporary (302) redirect. Change the "/example/test.html" to your old location. Then put your new location in where it says "http://www.yoursite.com/newlocation/newpage.html". You're done!


Either method is really simple and should get the job done.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.