Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Sub domain - Redirection

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
5 posts • Page 1 of 1
gobinathdpi
Posts: 7
Joined: Wed Mar 12, 2014 9:16 am

Sub domain - Redirection
  • Quote

Post by gobinathdpi » Tue Mar 25, 2014 1:42 am

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?
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: Sub domain - Redirection
  • Quote

Post by imperio » Tue Mar 25, 2014 11:18 am

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
Top

gobinathdpi
Posts: 7
Joined: Wed Mar 12, 2014 9:16 am

Re: Sub domain - Redirection
  • Quote

Post by gobinathdpi » Wed Mar 26, 2014 3:41 pm

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
Top

uksitehost
Posts: 10
Joined: Sun Sep 07, 2014 5:57 am

Re: Sub domain - Redirection
  • Quote

Post by uksitehost » Wed Sep 10, 2014 6:53 am

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.
Top

gobinathdpi
Posts: 7
Joined: Wed Mar 12, 2014 9:16 am

Re: Sub domain - Redirection
  • Quote

Post by gobinathdpi » Fri Oct 10, 2014 4:38 am

Thank you very much its working fine
Top


Post Reply
  • Print view

5 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password