I have a few links, one of which is converting the URL in the browser to the IP address of the server when the user clicks it and I have no idea why:
<a href="http://myserver.com/a.php">a</a>
<a href="http://myserver.com/b.php">b</a>
<a href="http://myserver.com/wiki/index.php">d</a>
<a href="http://myserver.com/c.html">c</a>
a, b, and c show http://myserver.com/a.php
, but when I click on the wiki link I get 1.2.3.4/wiki/index.php
and I can't figure out how to get this url to properly reflect the domain name.
I've tried using a relative link /wiki/index.php
, and changing the URL slightly http://myserver.com/wiki/
Any ideas?
Why the downvotes? This is a completely valid question....
答案 0 :(得分:1)
就像我在评论中所说:
如果它们设置正确,请检查LocalSettings.php中的$wgServer
,$wgScriptPath
和$wgArticlePath
配置变量。所有这些变量都用于将请求重定向到&#34;更正&#34; (wgServer是正确的 url)网址。因此,如果您$wgServer
设置为服务器的IP,则对您的域的所有请求都将被mediawiki重定向到IP地址。