MilesWeb Hosting Forum

Web Hosting Technical Support => Errors and Solutions => Topic started by: Dipak Bhoi on September 12, 2014, 02:55:25 PM

Title: MediaWiki Site - Redirect problem.
Post by: Dipak Bhoi on September 12, 2014, 02:55:25 PM
Hello guys,

One of our customer was facing a problem with his MediaWiki site which was redirecting to other URL. We did check all suspected things like .htaccess file Rules, database redirection or suspicious files but no luck with that. After a bit dip investigating on it, I found the exact problem.

The problem was with the file LocalSettings.php under public_html directory of that account. There is a variable $wgScriptPath which was redirecting site to another URL. Below are the steps to fix this issue.

1. Login to your server via SSH
2. Go to public_html directory of your account and edit file LocalSettings.php using vim editor.

Quote#cd /home/username/public_html
#vi LocalSettings.php

3. Now find for Variable $wgScriptPath in file. Check the value define to that variable, it should be like as below.

Quote$wgScriptPath = "";

4. If you found any other value set to this variable as below then set it as above.

Quote$wgScriptPath = "anyotherurl[dot]com";

5. That's it. You are done.

Enjoy !!