SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    ko pročita magarac :) boccio's Avatar
    Join Date
    Oct 2003
    Location
    belgrade
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Remapping subdomains - blogger.com style

    Hi,

    I got a major problem, I somehow need to redirect non-existing subdomains, to subfolder, or even better only to URL parameter. Typical example of this:

    User registeres as "John", and he gets his http://john.example.com URL. Now, since I won't actually create subdomain for every respective user, I somehow need to remap this to either www.example.com/john, or even better to www.example.com/?id=john

    I tried with:
    Code:
    RewriteEngine On
    
    RewriteCond %{HTTP_HOST} ^[^.]+\.example\.com$
    RewriteRule ^([^.]+)\.example\.com(.*) index.php?sub=$1 [L]
    But it won't work... any help at all highly appreciated!
    Vivvo CMS - Web publishing at your fingertips
    Mile voli disko, a ja belo kolumbijsko

  2. #2
    SitePoint Zealot
    Join Date
    Aug 2005
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    {deleted by me}

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2005
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to get your hosting provider to enable wildcard DNS.

  4. #4
    ko pročita magarac :) boccio's Avatar
    Join Date
    Oct 2003
    Location
    belgrade
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by thefallen
    You need to get your hosting provider to enable wildcard DNS.
    Yes, you're right.. seems like that is the only way, can't be done w/o the hosting provider.

    Thx.
    Vivvo CMS - Web publishing at your fingertips
    Mile voli disko, a ja belo kolumbijsko


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •