woodsm
Member
Posted 17 years ago #
I have been looking through the forums for a few days now for this solution, but I have not been able to implement any existing suggestions. I may have missed the thread, as there a lot of thread relating to htaccess and subdomains.
I have WPMu installed at domain.com. I want bbpress to run at forums.domain.com.
How can I tell WPMu to ignore this domain and let bbpress do it's thing for this domain?
lunabyte
Member
Posted 17 years ago #
Did you read the bbpress thread?
That exact setup is in there.
woodsm
Member
Posted 17 years ago #
Which thread is that exactly?
previous subdomains
Hope this helps,
-drmike
woodsm
Member
Posted 17 years ago #
Thanks DrMike -
I thought that was the post I should be looking at.
I tried the rewrite code from that page, and it just redirects me to the signup page. (domain.com/wp-signup.php?new=forums). I've tried it with the name listed and not listed in the "Banned Names" list.
My domain is being served out of:
/var/www/domain.com/public_http
And I'd like to run bbPress out of
/var/www/domain.com/public_http/forums
RewriteEngine On
RewriteBase /
# Rewrite http://www.domain.com to domain.com
RewriteCond %{HTTP_HOST} ^www.(.*)
RewriteRule ^(.*) http://%1/$1 [R,L]
#Rewrite for subdomains we do not want WPMu to handle
RewriteCond %{HTTP_HOST} forums.domain.com
RewriteCond %{REQUEST_URI} !forums/
RewriteRule ^(.*)$ forums/$1 [L]
...the rest of the usual htaccess file...
I think your order is incorrect. Here's part of mine:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} support.daria.be
RewriteCond %{REQUEST_URI} !support/
RewriteRule ^(.*)$ support/$1 [L]
# Rewrite http://www.domain.com to domain.com
RewriteCond %{HTTP_HOST} ^www.(.*)
RewriteRule ^(.*) http://%1/$1 [R,L]
Hope this helps,
-drmike
woodsm
Member
Posted 17 years ago #
woodsm
Member
Posted 17 years ago #
Another method I just tried was using virtual hosts, becuase I could not get domain.com/forums to redirect to forums.domain.com without a redirect loop or 500 error.
I set apache to load forums.domain.com load before *.domain.com, Apache seems to use the first virtual host.
Anyone see any potential issues I might run into this way?
lunabyte
Member
Posted 17 years ago #
Not me. That's how I set my stuff up when a vhost has wildcards enabled but I need a physical subdomain created.
The side benefit to it is that you can specify its base directory, so if it's at something like
/home/sites/my_mu_site/subdom/, which would physically be inside your mu sites root, it will ignore the htaccess file in the mu site's root.
At least it is on my local test server. Although I did stick the rewrite rule in the above directory (in the mu htaccess file) just as a precaution.
woodsm
Member
Posted 17 years ago #
This would be a great article for the codex.
I'll write up both methods. Any name suggestions? I'm at a loss for a good concise title.
"WPMU Ignore Certain Subdomains" ??
lunabyte
Member
Posted 17 years ago #
Maybe "Non-Wildcard Subdomains With MU"?
Or "Valid/Existing Subdomains With MU"?
Maybe "Ignore Physical Subdomains With MU"?
I dunno, something of the sort perhaps.
I swaer I'll get to it one day. :)
woodsm
Member
Posted 17 years ago #
I am sure with a little help this page can mature very quickly.
Codex: Ignore Some Subdomains With WPMu
Thanks to everyone for their help.