I use lunarpages for my hosting, and can have multiple websites added on. When I add a new website, it creates a directory in where my current site exists
ie my site is jeffkilroy.com, if I make a domain for hello.com, it now also exists at jeffkilroy.com/hello
This is fine except I would like to organize it a bit better so that the site directories don’t mix with my jeffkilroy.com files
If I put all my jeffkilroy.com site files in something called “main”, Is it possible to put something in htaccess where:
jeffkilroy.com/home really goes to jeffkilroy.com/main/home
but still be able to easily access my stuff from the root (other sites):
jeffkilroy.com/hello
This solution is entirely dependent on you not having folders in your root (for the other sites) that are named the same as folders in your main site, but since you still want to be able to access the other sites’ folders from the root, there’s not much way around that.
Anyway, this seems to work:
Side note for the curious: It would be nice to be able to condense the
RewriteCondstatements by using the[OR]flag, but there is no operator precedence, so it’s just evaluated top-to-bottom, which wouldn’t work here.