Thread:Project:Support desk/domain of URL automatically replaced by servername (IMHO not a apache redirect issue)

Hello,

I really searched well because it seems a simple problem. The only thing I know is that is isn't an apache redirect thing (redirect works but AFAIK I don't need redirect).

In short: I want that my domain name stays in the URL of the browser. Right now, it gets changed to the server-name as soon as I access the wiki. I think it is the wiki who does this but I don't know how to change the behaviour.

A) Setup: Ubuntu 12.04 server LTS 1)Mediawiki:

MediaWiki    1.24.0

PHP    5.3.10-1ubuntu3.15 (apache2handler)

MySQL    5.5.40-0ubuntu0.12.04.1

Entry points:

Article path   /mediawiki/index.php/$1

Script path   /mediawiki

index.php   /mediawiki/index.php

api.php   /mediawiki/api.php

load.php   /mediawiki/load.php

2) apache config:        ServerAdmin webmaster@localhost        ServerName wiki.mydomain.com        ServerAlias mywiki

DocumentRoot /var/www/mediawiki/

 Options FollowSymLinks AllowOverride None   Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all 

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/  AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all 

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"  Options Indexes MultiViews FollowSymLinks AllowOverride None Insert non-formatted text here Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 



3) LocalSettings.php: it is a fresh wiki, so nothing special is edited here. I have the following parameters set:

$wgMetaNamespace = "my_fancy_wiki";

$wgScriptPath = "/mediawiki"; $wgScriptExtension = ".php";

$wgServer = "http://lorette"; ##<== this is the name of the webserver
 * 1) The protocol and server name to use in fully-qualified URLs

$wgStylePath = "$wgScriptPath/skins";
 * 1) The relative URL path to the skins directory

B) current outcome:

1) I access the mediawiki via http://wiki.mydomain.com.

2) the page is correctly shown but the URL in the browser changes to

http://lorette/mediawiki/index.php/my_fancy_wiki

C) wished outcome:

1) I access the mediawiki via http://wiki.mydomain.com.

2) the domain-part of the URL stays the same, eg: http://wiki.mydomain.com/index.php/my_fancy_wiki

it is an intranet site and I have an appropriate AAA record set to have the domain point to the IP.