Rewrting sub-domain names

Discussion in 'Apache' started by redhits, Oct 19, 2009.

  1. #1
    How i can re-write sub-domain names?

    Like i want control everybody who access

    dir1.xtool.com
    dir2.xtool.com
    dir3.xtool.com
    dir4.xtool.com

    i want to be sent to an seo.php page where i will get the request uri and give them a dynamic page...
     
    redhits, Oct 19, 2009 IP
  2. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #2
    Use a wildcard that is setup hosting for *.xtool.com then in the scripting language, e.g. PHP, just look for the host name, should allow you an unlimited number of subdomains which your scripts can process.

    If you only have a limited number of subdomains then just set them all up pointing to the same folder, again in the scripting language just look for the host name.
     
    tolra, Oct 26, 2009 IP