Jump to content

Two Parked Domains And Mediawiki


Recommended Posts

Okay, "level 2" support said it wasn't their problem and I should try here--but I somehow still think it is the way the second domain is setup but here goes anyway.


I've previously had one domain (zaventh.com) running Mediawiki at http://www.zaventh.com/wiki . Now, I wanted to simply throw a new domain on top of that (nexuswiki.com) so that if you went to zaventh.com/wiki, it would be the exact same as nexuswiki.com/wiki. TCH parked the second domain for me, and I have it all setup as you would expect a domain should be.


Now, if one navigates to www.nexuswiki.com/wiki, it automatically rewrites the url to be pretty, and it should take you to http://www.nexuswiki.com/wiki/index.php/Main_Page, but it doesn't. Instead it takes you to http://www.zaventh.com/wiki/index.php/Main_Page. At first I thought perhaps the domain wasn't working right, but if you navigate to http://www.nexuswiki.com/wiki/index.php/Main_Page it works fine and as expected, except that if you save an edited page, it will redirect you back to the right page, but with the zaventh.com domain in place of nexuswiki.com.


My next and logical assumption was that it was using the domain name as a variable somewhere, but I couldn't see any obvious place to set it as it wasn't in the main config. So, I first search the entire mysql database, and there are 0 reference to either domain there. Next, I downloaded every file in the wiki and

>grep -i "zaventh" *.*

'd them all, and nothing came up. Nothing for the other domain either. This is what led me to believe somehow that nexuswiki.com was somehow resolving to zaventh.com, and when a redirect was called on the wiki, that is where it was going.


At any rate, if I would navigate to http://www.nexuswiki.com/index.php, it still wouldn't work right. The only thing between index.php and Main_Page is redirect.php. None of these files contain any actual domain names, but rather are used to rewrite the url I believe. I have attached these files, though I can't really see anything in them that would be causing the problem I am having.


Any help or ideas of where else to look would be great... Thanks.



Link to comment
Share on other sites

I'd suggest looking at your .htaccess file(s) and see if there are any redirect or mod_rewrite directives that might perform a redirect from zaventh.com to nexuswiki.com.


Oh.. I thought of that too, so right now my .htaccess file is empty. MediaWiki doesn't include it's own .htaccess file except for in the subdirs which just deny access to them, so I forget what was in the original .htaccess but it was nothing related to mediawiki...

Link to comment
Share on other sites

  • 5 months later...

Mediawiki modified the URL to make it "tidy" in two places. A key one is through your .htaccess. I'd guess that somewhere you have some of the redirects in there with a domain name included. The other one is within a php redirect file.


Did you change anything (upgrade) when it stopped working

Link to comment
Share on other sites

I think I did in fact upgrade it a few months back (to the latest minor revision). However, the .htaccess file should not have changed since it was something I added on later anyway and is not included with mediawiki by default. Here is the file below:


>php_value upload_max_filesize 10m
RewriteEngine on

# uncomment this rule if you want Apache to redirect from www.mysite.com/ to www.mysite.com/wiki/Main_Page
RewriteRule ^$ /wiki/Main_Page [R] 

# do the rewrite
RewriteRule ^wiki/?(.*)$ /w/index.php?title=$1 [L,QSA]


If I disable the bottom rewrite line, it seems to not forward to my first domain anymore... but then the urls are terrible. I don't see how that line could come up with "zaventh.com" either... since it is still no where in any configuration or variable in mediawiki.





For some more info, I have tried many other solutions of getting this to work as layed out here:




But none except the above mentioned .htaccess rewrite ever worked for me.

Edited by Zaventh
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...