WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can not access sub directory site (2 posts)

  1. ethanyang
    Member
    Posted 3 years ago #

    Hi Folks, this may be a simple issue, but it bother me a lot. Very appreciated for any help.
    After installing a brand new 3.0.1 wordpress, I have successfully enabled multi-site and "super admin" could be displayed. After adding new site such as http://www.tian_1.com/test (www.tian_1.com is the url of my wordpress and I can access it), I can not access this url "www.tian_1.com/test". 404 is returned.
    In "super admin->admin", it displayed "You have 1 site and 1 user."
    But in "super admin->sites", a site with path "/" and another site with path "/test" are displayed.

    These are my config.
    wordpress directory: /usr/local/apache/htdocs/wordpress/

    In httpd.conf:
    LoadModule rewrite_module modules/mod_rewrite.so
    DocumentRoot "/usr/local/apache/htdocs/wordpress"
    <VirtualHost *:80>
    ServerAdmin tianfeng1015@gmail.com
    Servername http://www.tian_1.com
    ServerAlias *.tian_1.com
    ErrorLog logs/django-error.log
    CustomLog logs/django-access.log combined
    DocumentRoot /usr/local/apache2/htdocs/wordpress/
    <Directory /usr/local/apache2/htdocs/wordpress/>
    Options +ExecCGI -Indexes
    #SetHandler fastcgi-script
    AddHandler fastcgi-script fcgi
    </Directory>
    <Location />
    Order deny,allow
    Allow from all
    </Location>
    RewriteEngine On
    RewriteRule ^/(media.*)$ /$1 [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteRule ^/(.*)$ /sns.fcgi/$1 [QSA,L]
    </VirtualHost>

    In wp-config.php:

    define ('WP_ALLOW_MULTISITE', true);
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'www.tian_1.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    /* That's all, stop editing! Happy blogging. */

    In wordpress/.htaccess:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Please help me out. Thanks in advance.

  2. ethanyang
    Member
    Posted 3 years ago #

    It seems work after I change "AllowOverride None" to "AllowOverride All" in httpd.conf.
    Thanks for care.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.