Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a domain parked.com which is parked onto real.com.

I have created the subdomain m.parked.com by editing parked.com's named file:

m 14400 IN A  ip-address
www.m 14400 IN A  ip-address

This works somewhat: if I go to m.parked.com it redirects to http://m.parked.com/cgi-sys/defaultwebpage.cgi

This is my question:

I would like to redirect this subdomain to real.com as that is the domain it is parked on. I do not know how to do this as parked.com does not have its own .htaccess file, etc. (due to it being a parked domain) so I can't do any mod_rewrite magic.

Can anyone help me?

Thanks

EDIT: Clarification

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I have solved this issue.

  1. Edit parked.com's DNS record so it has a subdomain: m 14400 IN A ip-address
  2. Add m.parked.com to real.com's ServerAlias in httpd.conf
  3. Restart both Bind and Apache
  4. Going to m.parked.com will now bring you to real.com
  5. You can then use real.com's .htaccess for your normal URL rewriting.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.