On my domain, I have two subdomains set up: blogs.libertytruth.org, which links to a Wordpress installation (several, actually, since we have several bloggers who each have their own blog set up) which I have symlinked to public_html/blogs/blog_name (I have already symlinked public_html to the Rails liberty_truth/public directory), and discussions.libertytruth.org, which is a phpBB forum setup and links to (public_html/discussions).
For the love of me, I cannot figure out how to tell Apache NOT to try and parse these with Rails, but let PHP take over - if I access http://discussions.libertytruth.org, I get the "Rails application failed to start properly" error; it doesn't happen if I append index.php, but I don't want to customize every relative link in both PHP apps to show index.php.
I added the following lines to my .htaccess file in public_html (really liberty_truth/public):
RewriteCond %{REQUEST_URI} /^blogs.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} /^discussions.*
RewriteRule .* - [L]
Which would, I imagine (I admit, I don't really understand the Rewrite stuff in Apache - shame on me, I suppose), tell Apache not to have Rails parse http://www.libertytruth.org/blogs and http://www.libertytruth.org/discussions, respectively. However, if I go to those URLs I get a Rails 404 error.
I'd really like to use the subdomains in place of the relative link, but I can't seem to get it to work properly - Apache keeps trying to use Rails, and ends up erroring out because obviously Rails isn't going to know how to parse PHP files :)
Can someone please offer some help on how to do this? As I said I come from a Windows background, so this mucking around with configuration files is a little new to me.
Also, if I want to host multiple blogs, each with a separate Wordpress installation (say, no more than 10), would I need a separate Rewrite rule for each of them, pointing to their folder (e.g. public_html/blogs/johndoe, public_html/blogs/janesmith, etc.), or is there a "catch-all" rewrite condition? I don't know much about RegExp (never had to learn it before), but since that's what the RewriteCond thing looks like, the * should be 'wildcard' and force Rails to ignore anything in the public_html/blogs directory and child directories (which would then include the individual bloggers directories).
Again, any help would be greatly appreciated - I certainly plan to brush up on my Apache skills after this :-)
Thanks,
Wayne M.
Co-Founder
LibertyTruth.org