I have a hosting account for, say, abc.com. I also own the domains of
def.com, ghi.com, jkl.com etc.
My hosting provider links all of these domains into a single directory
path:
/home/myaccount/public_html
What I'm trying to attempt is the following:
- make a directory for each parked domain
- each domain can have its own web files
- accessed via mod_rewrite to do the following:
http://www.abc.com/* redirects to /home/myaccount/public_html/abc.com/*
http://abc.com/* redirects to /home/myaccount/public_html/abc.com/*
http://www.def.com/* redirects to /home/myaccount/public_html/def.com/*
http://def.com/* redirects to /home/myaccount/public_html/def.com/*
http://www.ghi.com/* redirects to /home/myaccount/public_html/ghi.com/*
http://ghi.com/* redirects to /home/myaccount/public_html/ghi.com/*
you get the idea...
So if I call
http://www.abc.com/index.php, it'll load up from
/home/myaccount/public_html/abc.com/index.php
Anyhow, I'm having trouble writing my rules and wondering if anyone has
a working example so I don't have to write a ton of scripts to parse
headers, etc.
Any help would be most appreciated.