• 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 :

    /var/www

    • 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 : https://subdomain.domain.com/ at the oposite of the current URL https://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)
  • If you want https://subdomain.domain.com/ then you absolutely must install it at https://domain.com/.

    no, no workarounds.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    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)

    Thread Starter jimmy216

    (@jimmy216)

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

    This is my config :

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

    <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]
    </Directory>
    </VirtualHost>

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

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

    By the way thanks for the support ??

    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.