deeppurple
Member
Posted 8 months ago #
Hi,
I install Worpress MU in http://domain.com/mu, and add 2 blogs subdomains: http://test1.domain.com and http://test2.domain.com
I used .htaccess rules (in root of http://domain.com/) for the subdomains blogs working-start without "/mu/" folder.
this is the .htacces rules:
RewriteCond %{HTTP_HOST} ^test1.domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^test2.domain.com$
RewriteRule ^(.*)$ /mu/$1 [L]
Now the internal liks for the subdomains works fine.
The problem is that I can't login, the first time the url admin page is:
http://test1.domain.com/wp-login.php
then I try to login with the correct user and password, don't show me any error message, only change the url like this:
http://test1.domain.com/wp-login.php?redirect_to=http%3A%2F%2Ftest1.domain.com%2Fwp-admin%2F
HOW CAN LOGIN TO A WP-ADMIN FOR SUBDOMAINS?
musnake
Member
Posted 8 months ago #
You should ask in the mu fora!
In your .htaccess file, is there a directive that protects wp-admin.php?
Can you log into the admin side of the primary blog? If you can, can you access the admin of child blogs from there (check dashboard tabs)?
deeppurple
Member
Posted 8 months ago #
ups, wrong forum.
NO, .htaccess file doesn't have any directive that protects wp-admin.
well, I can Login to the primary admin blog with out problems, the url is like:
http://domain.com/mu/wp-login.php
enter the user and password and works fine.
but I cant login to the sub-domains :(
musnake
Member
Posted 8 months ago #
Hmm, it's been more than a year since I touched Mu, but this is what one of my .htaccess files has: edit as necessary:
RewriteEngine On
RewriteBase /
#block .htaccess viewing
RewriteRule ^\.htaccess$ - [F]
# Prevents directory listing
Options -Indexes
# Lock WPMu out of the following subdomain directories...
# These occur before the final rewrite of http://www.domain.tld to domain.tld
# which is my preference on how the domain is branded
#RewriteCond %{HTTP_HOST} forum.mydomain.org
#RewriteCond %{REQUEST_URI} !forum/
#RewriteRule ^(.*)$ forum/$1 [L]
# Rewrite http://www.mydomain.org to mydomain.org with a 301
RewriteCond %{HTTP_HOST} ^www.(.*) [NC]
RewriteRule ^(.*) http://%1/$1 [R=301,L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ /$1/ [R=301,L]
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
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]
#Customize Error Messages
#ErrorDocument 400 /wp-content/error-page/400.htm
#ErrorDocument 401 /wp-content/error-page/404.htm
#ErrorDocument 403 /wp-content/error-page/403.htm
#ErrorDocument 404 /wp-content/error-page/404.htm
#ErrorDocument 500 /wp-content/error-page/500.htm
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>