Reputation: 3
I'm new to all of this honestly, I'm not even sure if i'm asking the question correctly. Basically I have a LAMP server setup to run mediawiki. I can get to by typing localhost/Wiki but I'd to only have to use localhost and it take me to the Main page of the wiki. Right now when I type it I just get a file browser (I removed the default apache2 index.html from /var/www/html. Another note to add is my Wiki index.php is under /var/www/html/Wiki/index.php. Let me know if this question is understandable as I am new.
Thanks for your time!
Upvotes: 0
Views: 769
Reputation: 601
The right way to achieve this, is to install mediawiki on /var/www/html
But here is a quick and dirty way do redirect.
Create the file /var/www/html/index.html
with the following lines:
<html><head><title>redirect</title>
<META http-equiv="refresh" content="0;URL=http://localhost/Wiki">
</head><body></body></html>
So, when you go to http://localhost
you will be redirected to http://localhost/Wiki
Upvotes: 1
Reputation: 28210
You need to set up URL rewriting (which is a way to tell the webserver how to translate the URL into a file system path - the default is something like <URL path>
-> /var/www/html/<URL path>
but you can do almost anything with the right configuration). There is a MediaWiki URL rewriting guide but if your wiki is accessible from the internet it's easier to use the Redwerks short URL builder.
Upvotes: 0