Support » Multisite » Hosting WP in a subdirectory

Hosting WP in a subdirectory

  • Hello,

    I have a tricky problem. I’m currently using WP 3.1 installed on a private server. This is the organisation of the server :


    • index.php
    • other files
    • a couple of folders
    • wordpress (which is the main directory of wordpress)

    WordPress is installed in its MU version using subdomains.
    My problem is that I want to provide to my users a URL like this : http://subdomain.domain.com/ at the oposite of the current URL http://subdomain.domain.com/wordpress/

    I tried to solve my problem using VirtualHost but it doesn’t work properly, it seems not to be able to communicate with the .htaccess.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    If you want http://subdomain.domain.com/ then you absolutely must install it at http://domain.com/.

    no, no workarounds.

    UNLESS you want your sites to be subdomain.domain.com/wordpress/blogname

    (or if you want subdomain.domain.com/blogname, at which point you would install in /var/www/subdomain and start from there)

    Not that tricky finally, I just had to turn things around.

    This is my config :

    <VirtualHost *:80>
    ServerName http://www.mydomain.com
    DocumentRoot /var/www

    <VirtualHost *:80>
    ServerName mydomain.com
    ServerAlias *.mydomain.com
    DocumentRoot /var/www/wordpress

    <Directory />
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]

    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]

    RewriteRule . index.php [L]

    I kicked out the .htaccess and everything is running well !

    My website run at http://www.mydomain.com and blogs run at subdomain.mydomain.com

    By the way thanks for the support 😛

    Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    DocumentRoot /var/www/wordpress

    Or that. 😀 I had actually thought of suggesting that bit, but I’m still recovering here, so my brain is a little slow on the uptake. (more so than usual ;P )

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hosting WP in a subdirectory’ is closed to new replies.
Skip to toolbar