Hi,
I have installed MediaWiki on the root of the webspace on http://www.example.com.
Now, when I visit http://www.example.com I am automatically redirected to http://www.example.com/index.php/Main_Page
Can I configure MediaWiki such that the main page stays at just http://www.example.com ??
Thank you, Luke
Lukas Haase wrote:
Hi,
I have installed MediaWiki on the root of the webspace on http://www.example.com.
Now, when I visit http://www.example.com I am automatically redirected to http://www.example.com/index.php/Main_Page
Can I configure MediaWiki such that the main page stays at just http://www.example.com ??
Thank you, Luke
No. Each page needs to have a name.
On 05/27/2010 11:13 PM, Platonides wrote:
Lukas Haase wrote:
Hi,
I have installed MediaWiki on the root of the webspace on http://www.example.com.
Now, when I visit http://www.example.com I am automatically redirected to http://www.example.com/index.php/Main_Page
Can I configure MediaWiki such that the main page stays at just http://www.example.com ??
Thank you, Luke
No. Each page needs to have a name.
The closest you can get is http://www.example.com/Main_Page if you set up short URLs (which removes the index.php part).
See: http://www.mediawiki.org/wiki/Manual:Short_URL
C.
Hi,
Am 28.05.2010 08:33, schrieb Clayton:
On 05/27/2010 11:13 PM, Platonides wrote:
Lukas Haase wrote: [...]
No. Each page needs to have a name.
:-( The first thing MediaWiki does not support :-(
The closest you can get is http://www.example.com/Main_Page if you set up short URLs (which removes the index.php part).
No, this does not help. I use MediaWiki for my homepage and I want to use the same URL as OpenID. So I added the following to the head of my template:
<link rel="openid.server" href="https://secure.example.com/openid" /> <link rel="openid.delegate" href="https://secure.example.com/openid" />
Actually it works, I can sign on with www.example.com (e.g. to Wiki Commons) but my (OpenID)user gets converted to www.example.com/index.php/Main_Page
I hope you understand my concern.
Regards, Luke
No, this does not help. I use MediaWiki for my homepage and I want to use the same URL as OpenID. So I added the following to the head of my template:
<link rel="openid.server" href="https://secure.example.com/openid" /> <link rel="openid.delegate" href="https://secure.example.com/openid" />
Actually it works, I can sign on with www.example.com (e.g. to Wiki Commons) but my (OpenID)user gets converted to www.example.com/index.php/Main_Page
Don't use the example.com/Page_title URL scheme. It isn't supported by developers and WILL break in ways you can't foresee (and if it doesn't, the developers might break it in a future version just to spite you). Some examples can be found at http://www.mediawiki.org/wiki/Manual:Wiki_in_site_root_directory#Reasons_why...
While it's still possible to do this, it's not recommended.
Hi,
Am 28.05.2010 21:13, schrieb OQ:
[...] Don't use the example.com/Page_title URL scheme. It isn't supported by developers and WILL break in ways you can't foresee (and if it doesn't, the developers might break it in a future version just to spite you). Some examples can be found at http://www.mediawiki.org/wiki/Manual:Wiki_in_site_root_directory#Reasons_why...
While it's still possible to do this, it's not recommended.
Thank you, I followed the instructions and modified my path: I moved mediawiki to /w, added the Alias directive and this is now my .htaccess:
RewriteEngine on RewriteRule ^$ /wiki/Main_Page
# Make sure old URLs work for some time... RewriteRule ^index.php/(.*)$ http://www.example.com/wiki/$1 [R,L]
Actually this solves not my problem described above: http://www.example.com is redirected to http://www.example.com/wiki/Main_Page :-( :-(
So I still can't use www.example.com as OpenID :(
Regards, Luke
On Fri, May 28, 2010 at 2:47 PM, Lukas Haase lukashaase@gmx.at wrote:
RewriteEngine on RewriteRule ^$ /wiki/Main_Page
...
Actually this solves not my problem described above: http://www.example.com is redirected to http://www.example.com/wiki/Main_Page :-( :-(
Yes, because your rewrite rule says to do that.
Hi,
Am 28.05.2010 21:54, schrieb OQ:
On Fri, May 28, 2010 at 2:47 PM, Lukas Haaselukashaase@gmx.at wrote:
RewriteEngine on RewriteRule ^$ /wiki/Main_Page
...
Actually this solves not my problem described above: http://www.example.com is redirected to http://www.example.com/wiki/Main_Page :-( :-(
Yes, because your rewrite rule says to do that.
No, it does not. This rule would redirect:
RewriteRule ^$ http://www.example.com/wiki/Main_Page [R]
My rewrite rule just maps the address "/" internally to the main page. The user should NOT be redirected. This is obviously done by MediaWiki.
In short I just want: * Access my wiki through http://www.example.com * Use www.example.com as OpenID, i.e. it should not be redirected externally.
Regards, Luke
On Fri, May 28, 2010 at 2:58 PM, Lukas Haase lukashaase@gmx.at wrote:
Hi,
My rewrite rule just maps the address "/" internally to the main page. The user should NOT be redirected. This is obviously done by MediaWiki.
It can't be both. Either A) You moved mediawiki to /w/ in which accessing / shouldn't ever reach mediawiki B) Or you didn't move mediawiki to /w/ even though you say you did.
Am 28.05.2010 22:03, schrieb OQ:
On Fri, May 28, 2010 at 2:58 PM, Lukas Haaselukashaase@gmx.at wrote:
Hi,
My rewrite rule just maps the address "/" internally to the main page. The user should NOT be redirected. This is obviously done by MediaWiki.
It can't be both. Either A) You moved mediawiki to /w/ in which accessing / shouldn't ever reach mediawiki
This is obviously done by MediaWiki (I guess with header("Location ...")
B) Or you didn't move mediawiki to /w/ even though you say you did.
I did:
$ ls -la insgesamt 20 drwxr-xr-x 3 luke www-data 4096 28. Mai 23:44 . drwxr-xr-x 18 luke www-data 4096 27. Mai 23:42 .. -rw-r--r-- 1 luke www-data 335 28. Mai 23:44 .htaccess drwxr-xr-x 16 luke www-data 4096 28. Mai 23:32 w $ cat .htaccess RewriteEngine on RewriteRule ^$ /wiki/Main_Page
And in the webserver config:
Alias /wiki /srv/www/w/index.php
Ok, once more: My rewrite-rule in the .htaccess *internally* hides "/wiki/Main_Page" behind "/". No HTTP redirect is done!
Proof:
RedirectRule ^$ /test.html
$ echo hello, world > test.html
Accessing this yields:
hello, world
and the client browser states http://www.example.com and *NOT* http://www.example.com/test.html. So my redirect does NOT do ANY HTTP redirects!
But MediaWiki seems to do so afterwards ...
Again: I *do* want my Wiki be accessible at http://www.example.com (in some way) but it should not (HTTP) redirect to something else (at least for the start page).
Regards, Luke
Am 28.05.2010 22:16, schrieb Lukas Haase:
Am 28.05.2010 22:03, schrieb OQ:
On Fri, May 28, 2010 at 2:58 PM, Lukas Haaselukashaase@gmx.at wrote:
Hi,
My rewrite rule just maps the address "/" internally to the main page. The user should NOT be redirected. This is obviously done by MediaWiki.
It can't be both. Either A) You moved mediawiki to /w/ in which accessing / shouldn't ever reach mediawiki
This is obviously done by MediaWiki (I guess with header("Location ...")
B) Or you didn't move mediawiki to /w/ even though you say you did.
I did:
$ ls -la insgesamt 20 drwxr-xr-x 3 luke www-data 4096 28. Mai 23:44 . drwxr-xr-x 18 luke www-data 4096 27. Mai 23:42 .. -rw-r--r-- 1 luke www-data 335 28. Mai 23:44 .htaccess drwxr-xr-x 16 luke www-data 4096 28. Mai 23:32 w $ cat .htaccess RewriteEngine on RewriteRule ^$ /wiki/Main_Page
I think I got it working :-)
$ cat .htaccess RewriteEngine on RewriteRule ^$ /w/index.php?title=Main_Page
Maybe the problem was a conflict between the Alias and the RewriteRule ...
Regards, Luke
On Thu, May 27, 2010 at 13:43, Lukas Haase lukashaase@gmx.at wrote:
Hi,
I have installed MediaWiki on the root of the webspace on http://www.example.com.
Now, when I visit http://www.example.com I am automatically redirected to http://www.example.com/index.php/Main_Page
Can I configure MediaWiki such that the main page stays at just http://www.example.com ??
Assuming that Apache is your web server, you can use mod_rewrite or the ProxyPass directive to map http://www.example.com to http://www.example.com/index.php/Main_Page
ProxyPass will be easiest to configure and should just require something like:
ProxyPass / http://www.example.com/index.php/Main_Page
Docs live at http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass
Note: I've not tested and it's 2am here. You've been warned. :)
Cheers! --zak
Hi,
Thank you
Am 28.05.2010 11:04, schrieb Zak Greant (Foo Associates):
On Thu, May 27, 2010 at 13:43, Lukas Haaselukashaase@gmx.at wrote:
Hi,
I have installed MediaWiki on the root of the webspace on http://www.example.com.
Now, when I visit http://www.example.com I am automatically redirected to http://www.example.com/index.php/Main_Page
Can I configure MediaWiki such that the main page stays at just http://www.example.com ??
Assuming that Apache is your web server, you can use mod_rewrite or the ProxyPass directive to map http://www.example.com to http://www.example.com/index.php/Main_Page
Yes it is. Proxy I would like to avoid because of overhead but I tried with mod_rewrite. I try with nonexistant URLs first so that I can see the 404 warning:
RewriteEngine On RewriteRule ^/$ /nonexistant
is ignored. This matches:
RewriteEngine On RewriteRule ^$ /nonexistant
I get a 404 not found error. So I tried
RewriteRule ^$ /index.php/Main_Page
instead. But I again get redirected to http://www.example.com/index.php/Main_Page
:-( :-(
One more idea?
Thank you very much. Luke
mediawiki-l@lists.wikimedia.org