The MU forums have moved to WordPress.org

Sub domain help please and thanks (7 posts)

  1. scrapmaster
    Member
    Posted 19 years ago #

    I wish to have the user blogs as a sub domain

    ie http://johndoe.scrapgalaxy.com

    I have done the following
    1. Installed WPMU into the root dir
    2. Permissions for root dir and wp-content set to 777
    3. My web hosting company has enabled mod_rewrite register_globals and errors are off.
    4. DNS wildcards are enabled

    Wordpress works fine for the admin blog that is not on a subdomain however when I attempt to create a sub-domain the registration works fine but I get a 404 not found when I try to activate the account.

    On a test account:

    user: test
    subdomain: test.scrapgalaxy.com
    activation key sent by email to test@scrapgalaxy.com:
    http://test.scrapgalaxy.com/wp-activate.php?key=bc3d9278e2cdc379

    .htaccess file:

    php_flag register_globals 0
    php_flag display_errors 0
    AddType application/x-httpd-php .php .php3 .html .phtml .foo
    AddType application/x-httpd-php-source .phps .bar

    RewriteEngine On
    RewriteBase BASE/

    # Rewrite http://www.domain.com to domain.com
    RewriteCond %{HTTP_HOST} ^www\.(.*)
    RewriteRule ^(.*) http://%1/$1 [R,L]

    #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]

    I suspect it has something to do with the .htaccess file

    Any ideas where I should start to look for trouble shooting ?

  2. andrea_r
    Moderator
    Posted 19 years ago #

    Are you *sure* the wildcard DNS is set up right? There's an awful lot on hte main domain that doesn't look like MU (unless you hacked it heavily) and any attempt at me trying out a sub-blog results in an Apache/Cpanel welcome screen.

    (mmmm scrapbooking...)

  3. lunabyte
    Member
    Posted 19 years ago #

    What about the edit required to httpd.conf?

    Did you read what Matt had posted about it?

    At the very bottom of Matt's page, there's a trackback/pingback to a site where a guy did a very nice walk through for WHM/Cpanel, including the httpd.conf edit.

  4. scrapmaster
    Member
    Posted 19 years ago #

    andrea_r

    I am not 100% posative, I will double check with the host, but I would assume that if the DNS wildcard was not setup correctly then I would get a 404 error .... I am no expert at this tho

    Lunabyte

    I have not read it, just tried looking for it any chance you can post a link to it ?

  5. andrea_r
    Moderator
    Posted 19 years ago #

    The link and info he's talking about is in the README file that came with the zip of MU.

    And not necessarily on the 404's - could do all kinds of stuff. Redirect to main page, go off into la-la land, go soemwhere else... it all depends.

    Also this line:
    RewriteBase BASE/
    should be
    RewriteBase /

    Did you install according to the included instructions? It's not done the same way as regular WP.

  6. lunabyte
    Member
    Posted 19 years ago #

    The reason I mentioned the edit for httpd.conf is because without it, it will indeed produce a 404 error on any subdomain. Even with the DNS configured correctly.

    (Don't ask how I found that out. :D)

  7. scrapmaster
    Member
    Posted 19 years ago #

    Alright I made some progress.

    I have read the readme file and I believe the DNS wildcards are now correct.

    My goal is to have my existing website http://www.scrapgalaxy.com host blogs for users.

    I am now left with a slight problem.

    http://testing.scrapgalaxy.com - loads the main scrap galaxy website

    The authorization link works

    http://testing.scrapgalaxy.com/index.php - Displays the blog (PERFECT!)

    However I do not wish to have the index.php show in the url. I also do not wish to have the rest of my site as http://scrapgalaxy.com

    I am guessing this is an htaccess issue

    Current htaccess file

    php_flag register_globals 0
    php_flag display_errors 0
    AddType application/x-httpd-php .php .php3 .html .phtml .foo
    AddType application/x-httpd-php-source .phps .bar

    RewriteEngine On
    RewriteBase /

    #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]

    Any ideas ?

    PS thanks for the help guys

    Also I should mention my main site Scrap Galaxy is index.html (was previously index.php I cahnged this to get Mu working). When a user goes to http://www.scrapgalaxy.com I would like index.html to load and if a user goes to a subdomain testing.scrapgalaxy.com to load index.php (mu)

About this Topic

  • Started 19 years ago by scrapmaster
  • Latest reply from scrapmaster