Redirect a domain in cPanel using .htaccess


April 7th, 2008

If you want to redirect your domain to some other domain using .htaccess you can do it in this way:

In your main domain under public_html (considering this is a cPanel server) directory from SSH you can create index file using the command:

touch index.php

chown username:username index.php

Then, use the command : nano .htaccess

And, paste the below line in the .htaccess file

RedirectMatch permanent ^/index.php$ http://redirectdomain.com

Now, try to browse your main domain. You’ll see that the it is redirected to the other domain now.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment