: Dynamic url for member 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
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
More posts by @Eichhorn148
4 Comments
Sorted by latest first Latest Oldest Best
Matt Mullenweg (Wordpress founder) wrote a good article on this subject. I've used it and it worked perfectly.
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.
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']
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.
www.addedbytes.com/for-beginners/url-rewriting-for-beginners/
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.