How to create Sub Domain with .htaccess

Discussion in 'Apache' started by aadi92s, Mar 30, 2010.

  1. #1
    How to create dynamic Subdomain in .htaccess file?
    Can any one help me how to write Rewrite Rule for it ?

    when user open www.example.com then open index.php
    if user open www.username.example.com then open profile.php (with user name record)

    Thanks
     
    aadi92s, Mar 30, 2010 IP
  2. sacx13

    sacx13 Active Member

    Messages:
    438
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Probably something like this will work:

     
    sacx13, Mar 30, 2010 IP