I have a challenge. My site has a community on "www.example.com/community/" - We found a new community software but they say they we need to use a subdomain to use their software, i.e. the subdomain is masked.
But we really want the community to continue to live at www.example.com/community and not community.example.com
THE QUESTION So the question is, if we mask our subdomain to their site, can we then use a MOD REWRITE to say
1. Anything that is requested from "community.example.com" instead of showing them this URL, instead, show them "www.example.com/community" 2. It would need to work for all possible pages and folders.
What do you think? Is there an example of how I can do this?
Heh. Do you realize you're asking the exact opposite of the usual subdomain question? A subdomain has no physical existence due to unalterable constraints of the three-dimensional universe. So any request for "subdomain.example.com" will involve a rewrite to either some wholly different location or, most commonly, a directory located at example.com/subdomain.
What do they mean by "need to use a subdomain"? A subdomain of their domain or yours? If the default software involves rewriting to community.example.com it should be easy to modify all relevant RewriteRules in the htaccess that comes with the software. But if you're looking at a specific software package with a specific set of rules, I don't want to give generic advice.
Matter of fact, the first thing you'll probably want to do is modify their boilerplate to fit your site. Crystal ball tells me you'll find it jam-packed with <IfModule> envelopes and !-f conditions.
In any case, rewriting from a physical location to a subdirectory and then back to a different physical location makes no sense and is a recipe for disaster. You'll want to change rules, not simply add new ones.