I have a wildcard subdomain *.domain.com
assigned to public_html/.
I want to make the directory www.domain.com/folder1/index.php?name=rock
to rock.domain.com
.
As for another one, I want to make www.domain.com/folder1/folder2/index.php?id=5
to 5.domain.com
Are there any way to do this? I'm a beginner in mod-rewrite. Really appreciate your help. Thanks
Additional Information
I need both of them. They will have different variables.
For example, /folder1/index.php is based on state name(?state=statename).
For the /folder1/folder2/index.php, it will be based on unique name(?name=uniquename).
So, www.domain.com/folder1/index.php?state=statename will be statename.domain.com
and www.domain.com/folder1/folder2/index.php?name=uniquename will be uniquename.domain.com
Thank you
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…