Wordpress MU - Problems with subdomains handling

Using a single web hosting account to host multiple sites

Wordpress MU - Problems with subdomains handling

Postby TheMadcap » Thu Oct 01, 2009 11:24 pm

Hello,

i've searched for any previous similar questions, but couldn't find any for this particular issue.

I'm running Wordpress MU in a shared hosting solution which allows me to use php/mysql/mod_rewrite.

The mod_rewrite file i'm using has this contents:

RewriteEngine On
RewriteBase /

#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,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 mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>

and I also created the DNS wildcard *.mydomain.com to accept all requests.

However, anytime I visit something.mydomain.com, I get an HTTP 500 Internal Server Error.

I noticed that, if I comment this line:

RewriteCond %{REQUEST_FILENAME} -d

everything works fine.

Can you find out what's the problem with this?

thank you so much!
TheMadcap
 
Posts: 1
Joined: Thu Oct 01, 2009 11:16 pm

Postby richardk » Fri Oct 02, 2009 4:13 am

Are the sub domain requests supposed to go to index.php?
What does your error log say is causing the error?

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

# add a trailing slash to /wp-admin
RewriteRule ^(.*/)?wp-admin$ /$0/ [R=301,L]

#uploaded files
RewriteRule ^(.*/)?files/$ /index.php [L]
RewriteCond %{REQUEST_URI} !^/(.*/)?wp-content/plugins(/.*)?$
RewriteRule ^(.*/)?files/(.*) /wp-content/blogs.php?file=$2 [L]

RewriteCond %{ENV:REDIRECT_STATUS} !^$ [OR]
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 mod_security.c>
  <Files async-upload.php>
    SecFilterEngine   Off
    SecFilterScanPOST Off
  </Files>
</IfModule>
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 28 guests

cron