Ugly URL on MediaWiki

Ugly URL on MediaWiki

Posted by: ibnhilman
Posted on: 2007-02-22 20:18:00

i got this when i installed mediawiki:

PHP server API is cgi-fcgi; using ugly URLs (index.php?title=Page_Title)

How can it be fixed to a beautiful one (index.php/Page_Title)?

Thanks

Re: Ugly URL on MediaWiki

Posted by: Raz2133
Posted on: 2007-02-22 20:21:00

In reply to:

How can it be fixed to a beautiful one (index.php/Page_Title)?


I don't use mediawiki myself, but does the following wiki article help?

http://www.wiki.dreamhost.com/index.php/Short_url

Mark

Re: Ugly URL on MediaWiki

Posted by: ibnhilman
Posted on: 2007-02-23 00:16:00

First, here's the condition. I installed media wiki in ~/domain.name/wiki/ and placed the .htaccess in ~/domain.name/ It still doesn't work. Thanks for the URL though. I followed it and here are the file:

.htaccess is like this (as the wiki article said):
===========
# rewrite rules for Short URLs:
Options FollowSymLinks
RewriteEngine On
# prevent your Dreamhost /stats from breaking
# (see http://wiki.dreamhost.com/index.php/Mod_rewrite)
RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/failed_auth.html$
RewriteRule ^.*$ - [L]
# end of /stats fix
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Use this one if you are using *ugly URLs* -- PHP as CGI:
RewriteRule ^wiki/?(.+)$ /index.php?title=$1 [L,QSA]
==========

And i put these line to LocalSettings.php:
$wgScriptPath = "/wiki";
$wgArticlePath = "$wgScriptPath/$1";

Thanks


Re: Ugly URL on MediaWiki

Posted by: Raz2133
Posted on: 2007-02-23 03:09:00

In reply to:

It still doesn't work.


I had a quick look at the wiki article, and I can't see anything obvious that you have done wrong.

As I said in my first post, I don't use MediaWiki, so I can't help a lot. Hopefully someone more familiar with the package will drop in with a suggestion or two.

Mark

Tags: mediawikiserver apiugly urlsphp serverugly urlfcgi