This is somehow related with an old question I posted earlier and that Richard already replied a ton of times, probably. Sorry for that.
So, now I'm using a solution you talked once regarding subdomains and subdirectories but now I need it to work also with WordpressMU in the same wildcarded DNS space and I'm having issues just with that (and not with WPMU).
The domain in question is http://healthblogs.org and the problematic subdomains all give this error:
Site Temporarily Unavailable
We apologize for the inconvenience. Please contact the webmaster/ tech support immediately to have them rectify this.
error id: "bad_httpd_conf"
You can check them at http://faq.healthblogs.org/ http://moon.healthblogs.org/ http://ourstats.healthblogs.org/ and http://support.healthblogs.org/
The .htaccess in questions is:
- Code: Select all
Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Show Stats
# :: added this to show AWStats stats
RewriteCond %{REQUEST_URI} ^/(stats|failed_auth\.html)/?(.*)$ [NC]
RewriteRule ^.*$ - [L]
# Rewrite www.domain.com to domain.com
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule ^(.*) http://%1/$1 [R,L]
####################################
#
# Here below start the rules that may cause the error ;(
#
####################################
# mod_dir fix.
# :: Added from other mod_rewrite.com recipe
RewriteCond %{HTTP_HOST} ^([^\.]+)\.healthblogs.org$ [NC]
RewriteCond %{DOCUMENT_ROOT}/subsites/%1%{REQUEST_URI}/ -d
RewriteRule !/$ %{REQUEST_URI}/ [R=301,L]
# If directory exists for subdomain, rewrite it.
# :: Added from other mod_rewrite.com recipe
RewriteCond %{HTTP_HOST} ^([^\.]+)\.healthblogs.org$ [NC]
RewriteCond %{DOCUMENT_ROOT}/subsites/%1/ -d
RewriteCond %1%{REQUEST_URI} !^([^\.]+)/\1(/.*)?$
RewriteRule ^(.*)$ /subsites/%1/$1 [QSA,L]
# /subsites/subdomain/ --> subdomain.healthblogs.org
# :: Added from other mod_rewrite.com recipe
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{REQUEST_URI} ^/([^/]+)(/.*)?$
RewriteCond %{DOCUMENT_ROOT}/subsites/%1/ -d
RewriteRule .* http://%1.healthblogs.org%2 [R=301,L]
####################################
#
# Here below start the WPMU rules that work quite fine :)
#
####################################
#uploaded files
RewriteRule ^(.*)?/?files/(.*) wp-content/blogs.php?file=$2 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
Help please. The site is already in production :\
Best and thanks again,
Lopo