One way you can do this is setup another virtual host at the top of the
list of virtual hosts which responds to the default address
only and includes a permanent redirect to the full
Redirect / http://mysite.example.org/
[mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Michael Roach
Sent: 02 June 2006 22:28
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] Apache virtual hosts
I have a box running mediawiki and am now using virtual hosts on it to
enable me to have a test version of the site running on port 8080. What
the "proper" way to force visitors to use the full server dns name? So,
I browse to 'http://mysite' the production wiki pops up and
'http://mysite:8080' the test wiki is shown. works great. love it. Now
what I want to happen is that when a visitor goes to 'http://mysite'
get redirected to 'http://mysite.example.org' and going to
'http://mysite:8080' takes them to 'http://mysite.example.org:8080'.
Basically, I want them to always be using the full canonical host name.
I'm not sure how to setup a redirect like this in Apache2.
Any tips would be appreciated.
MediaWiki-l mailing list