Page 1 of 1

Sub domain - Redirection

Posted: Tue Mar 25, 2014 1:42 am
by gobinathdpi
Hello

I am new to VestaCP and i love it, i want to do something like this for a sub domain

I have blog.domain.com

it should redirect to

blog.wordpress.com

I tried all possible ways in the panel for doing this but its not working, how to do this in VestaCP or in any other method?

Re: Sub domain - Redirection

Posted: Tue Mar 25, 2014 11:18 am
by imperio
Hi,
you can do it in the .htaccess file

1. in the blog.domain.com main directory create this file

Code: Select all

.htaccess
(the dot at the beginning of compulsory)
in this file add:

Code: Select all

Options +FollowSymLinks
RewriteEngine on

RewriteRule (.*) http://blog.wordpress.com/$1 [R=301,L]
2. all this subdomains must exist in the panel

Re: Sub domain - Redirection

Posted: Wed Mar 26, 2014 3:41 pm
by gobinathdpi
Hello

I tried, added the same code ( before this also i tried several times with the .htaccess file) but its not working

I had created the sub domain www.blog.domain.com and then via ftp added this file in the public_html folder and tried in the browser but its not working

Re: Sub domain - Redirection

Posted: Wed Sep 10, 2014 6:53 am
by uksitehost
when adding a new domain add it like a subdomain for example sub.domain.com and it will create a new web folder for it... it should automatically configure your dns for you as well.. as long as your using the same ip address as the original domain.com no need to touch DNS records
I can confirm this works perfectly fine. you may have to wait for the domain to propagate.

Re: Sub domain - Redirection

Posted: Fri Oct 10, 2014 4:38 am
by gobinathdpi
Thank you very much its working fine