HELP PLEASE ... Subdomain Wildcard

I am trying to setup on my blog hosting site a subdomain feature so that http://username.xignablogs.com points to http://xignablogs.com/blogs/username

So far I have got this...

http://xignablogs.xignablogs.com points to http://xignablogs.com/blogs/xignablogs

That is great! But try clicking a link! It seems to the load the INDEX.php file from the public_html dir and not public_html/blogs/xignablogs/index.php

1) To get this to work I have a dns entry of:

*.xignablogs.com. 14400 IN A 72.21.43.114

2) In my httpd.conf I added:

*.xignablogs.com

To the ServerAlias part.

3) Finally I added this to my .htaccess in 'public_html'...

RewriteEngine On
RewriteRule ^\.htaccess$ - [F]
RewriteCond %{HTTP_HOST} !^www\.xignablogs\.com?$
RewriteCond %{HTTP_HOST} ^([^.]+)\.xignablogs\.com?$
RewriteRule ^$ /blogs/%1/index.php [L]

What do I do to get it working properly?

Luke

 

 

 

 

Top