Hi. My file structure is set up as such:
/usr/home/mysite.com/htdocs is where the root of my web documents are.
Additionally, I have:
/usr/home/mysite.com/projects/
/usr/home/mysite.com/images/
/usr/home/mysite.com/junk/
and so on.
I would like to create a rewrite rule which specifies that any request for:
mysite.com/{rest_of_path}
or
www.mysite.com/{rest_of_path}
is mapped to
/usr/home/mysite.com/htdocs/{rest_of_path}
However, anything else, e.g.
{subdomain}.mysite.com/{rest_of_path}
is mapped to
/usr/home/mysite.com/{subdomain}/{rest_of_path}
In other words, if {subdomain} == 'www' or isn't specified, look in mysite.com/htdocs. Otherwise, look in mysite.com/{subdomain}.
Any help would be greatly appreciated. I'm having trouble with the conditional portion of the rule. Thanks!
/usr/home/mysite.com/htdocs is where the root of my web documents are.
Additionally, I have:
/usr/home/mysite.com/projects/
/usr/home/mysite.com/images/
/usr/home/mysite.com/junk/
and so on.
I would like to create a rewrite rule which specifies that any request for:
mysite.com/{rest_of_path}
or
www.mysite.com/{rest_of_path}
is mapped to
/usr/home/mysite.com/htdocs/{rest_of_path}
However, anything else, e.g.
{subdomain}.mysite.com/{rest_of_path}
is mapped to
/usr/home/mysite.com/{subdomain}/{rest_of_path}
In other words, if {subdomain} == 'www' or isn't specified, look in mysite.com/htdocs. Otherwise, look in mysite.com/{subdomain}.
Any help would be greatly appreciated. I'm having trouble with the conditional portion of the rule. Thanks!