Problem redirecting sub domain using mod rewrite
Hi all!
I'm looking to give my website a major overhaul, and found this great idea in the forums. (refer this post)
Here is what I've done so far:
1. I've enabled wildcard sub domains, so as of now, http://anything.ahste.com is also a valid link.
2. I'm using the mass url module, so every users blog is now at http://www.ahste.com/blog/username
3. I've added the rewrite rules as given by yelvington in the last comment in that post.
The code in my .htaccess file is :
RewriteCond %{HTTP_HOST} ^.+\.([^\.]+)\.ahste\.com$ [NC]
RewriteRule ^(.*)$ http://www.ahste.com/blog/%1
RewriteCond %{HTTP_HOST} ^([^\.]+)\.ahste\.com$ [NC]
RewriteCond %{HTTP_HOST} !^www\.ahste\.com$ [NC]
RewriteRule ^(.*)$ http://www.ahste.com/blog/%1 Unfortunately, either that re-write isnt working, or something is really wrong.
when I follow a random subdomain, it shows me phpinfo() for my server.
I really need this to work. Help!
-Gautam Chandna
http://www.ahste.com - still working on it...
ps. I have no clue what that code means.. please help even if its just a missing . or , or whatever..?

Shared host ... ?
Hi Gautam !
Don't know if this is typical of shared hosts, but I'm on one and it seems as though I can enable wildcard sub domains, but there are restrictions and it won't work (only static sub domains).
phpinfo() is probably the standard index file shown when a uninitialised sub domain is used.