Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

It may be a very basic question. I am trying to user url of the form:
"membername.example.com" but I have no idea what would be the steps to be performed.
We are using apache web server.

Thanks,
Ankur

share|improve this question

4 Answers 4

Matt Mullenweg (Wordpress founder) wrote a good article on this subject. I've used it and it worked perfectly.

share|improve this answer

You need to use the mod_rewrite URL rewriting engine to do what you describe.

Here is a link called "URL Rewriting for Beginners" that will orient you to the subject. Read it, but also click through to some of the links it provides for documentation on how to deploy it.

http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/

share|improve this answer

Well...

first you need to use htaccess to redirect all requests to one page (of course you could manage this in other 1000 ways, but this approach is easier IMHO). And the correct term would be rewrite and no redirect.

I am supposing too that you are using a scripting language at your backend. You can use its facilities to determine the correct request.

For example, on PHP you should be able to access that info through $_SERVER['HTTP_HOST']

share|improve this answer

In addition to using URL rewriting, you need to also configure your nameservers to point *.example.tld to your web server. For example:

*.example.tld.        CNAME  example.tld.

Your case is simple enough to implement, but you should be aware of the limitations of wildcard DNS records—namely:

  • A wildcard can only be used in place of a DNS label, not as part of it. (I.e. you can't do something like mysql*.example.tld to match mysql1.example.tld and mysql2.example.tld.)
  • A wildcard has to be the left-most label in a hostname. (I.e. you can't do something like start.*.example.tld.)
  • A wildcard will only match if there are no records of any type matching the requested hostname. So if an MX record exists for the hostname, then a CNAME wildcard will not match that hostname, even if no CNAME record exists for it.
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.