Point a subdomain to a page on the domain

March 25, 2014 2.5k views
Hey guys, My goal here is to pint http://cydia.ge0rges.com/ to http://ge0rges.com/repo. I have no idea how to this.. usually I would think the provider would have a solution to this like others do but DO doesn't. I tried adding a CNAME but support told me that wasn't what it was for and suggested I implement a 301 redirect which I tried doing without success. Currently I don't have anything setup not even the subdomain, I'm running the latest version of wordpress. Any help is appreciated, Thanks a lot, Georges
1 Answer
Assuming you have setup a virtualhost for you subdomain, simply add the following line to the VirtualHost block defining your subdomain

Redirect permanent / http://ge0rges.com/repo

so it should look like

ServerAdmin webmaster@localhost
ServerName cydia.ge0rges.com
ServerAlias cydia.ge0rges.com

Redirect permanent / http://ge0rges.com/repo
Have another answer? Share your knowledge.