UtamaBeritaTutorialBlogTool


Category: WPMU

Enable Wildcard for Wordpress MU

Posted By: zainal on August, 03 2007

To allow each new user to have his/her blog hosted in subdomain (eg. http://user.domain.com), you’ll need a wildcard entry in the DNS. To enable wildcard dns, you have to add one single line to your domain name zone:

*.domain.tld. IN A 123.456.78.9

Apache Setup
Open httpd.conf and add the following line at the VirtualHosts section:

DocumentRoot /www/subdomain
ServerName www.domain.tld
ServerAlias *.domain.tld

If you are on shared hosting such as Cpanel, you need to contact the support team and ask them if wildcards are enabled on your account. If not, tell them to add a wildcard entry in the DNS for a particular domain.


6 Comments | Category: WPMU

How to get blog name

Posted By: zainal on February, 07 2007

Use the explode() function on URL to get the blog name.

For example: http://blog.ilmuit.com/blogname

$blogname = explode("/", get_bloginfo('url'));
echo $blogname[3];


No Comment | Category: WPMU