Thread:Project:Support desk/Can I associate different wikis with different localhost aliases?/reply (4)

Really? Do you do anything special? Or more likely, am I doing something wrong? lol

My Windows hosts file looks like this:

127.0.0.1      localhost 127.0.0.1      www.mywiki.org 127.0.0.1      www.mywiki2.org

I changed my Apache http.conf file to look like this:

RewriteEngine On

RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/mywiki/index.php [L] RewriteRule ^/*$ %{DOCUMENT_ROOT}/mywiki/index.php [L] RedirectMatch ^/$ http://mywiki/wiki/

RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/mywiki2/index.php [L] RewriteRule ^/*$ %{DOCUMENT_ROOT}/mywiki2/index.php [L] RedirectMatch ^/$ http://mywiki2/wiki/

In my LocalSettings.php file for MyWiki, I changed it to:

$wgServer = 'http://www.mywiki.org'; $wgScriptPath = "/mywiki"; $wgArticlePath = "/wiki/$1";

And in my LocalSettings.php file for MyWiki2, I changed it to:

$wgServer = 'http://www.mywiki2.org'; $wgScriptPath = "/mywiki2"; $wgArticlePath = "/wiki/$1";

But then, when I typed

http://www.mywiki.org/wiki/Main_Page

or

http://www.mywiki2.org/wiki/Main_Page

into my browser, it displayed MyWiki2, but not MyWiki.