Forums

URL in multisite (4 posts)

  1. webladynz
    Member
    Posted 10 months ago #

    I have wordpress installed on Windows 7 using Xampp. It is installed in localhost/wordpress.

    I have setup a multisite with one site. I have amended my virtual hosts and hosts and htaccess files as follows :-
    -----------------------------------------------------------
    127.0.0.1 localhost
    127.0.0.1 wordpress
    -----------------------------------------------------------
    '<VirtualHost *:80>
    DocumentRoot "D:/xampp/htdocs/"
    ServerName localhost
    </VirtualHost>

    <VirtualHost *:80>
    DocumentRoot D:/xampp/htdocs/wordpress
    ServerName wordpress
    <Directory "D:/xampp/htdocs/wordpress">
    Options Indexes FollowSymLinks
    AllowOverride FileInfo
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>'
    -----------------------------------------------------------
    'RewriteEngine On
    RewriteBase /wordpress/
    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).*) $1 [L]
    RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]'
    --------------------------------------------------------------------

    From my brower I am able to access the following:-

    localhost ---> Xampp Admin
    wordpress ---> localhost/wordpress
    localhost/wordpress/tpc ---> site 1
    -----------------------------------------------------------

    Ideally I would simple like to type in tpc to get to my site.

    I know in drupal, which creates actual folders for its sites, this would be done with ease, but I stuck on getting it to work on the Virtual Sites created by wordpress.

  2. Andrea_r
    team pirate
    Posted 10 months ago #

    Ideally I would simple like to type in tpc to get to my site.

    you do that in your hosts file.

    THEN you install wordpress there so it has tpc in the domain name areas. I'd also suggest using a fake extension like .loc, so its tpc.loc.

  3. webladynz
    Member
    Posted 10 months ago #

    So is there anyway this can be manually amended since I installed workpress before I made entries into the hosts file.

  4. Andrea_r
    team pirate
    Posted 10 months ago #

    Yeah, go into the db and fix all the urls. ;)

Reply

You must log in to post.

About this Topic