<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>handyfloss &#187; mediawiki</title>
	<atom:link href="http://handyfloss.net/tag/mediawiki/feed/" rel="self" type="application/rss+xml" />
	<link>http://handyfloss.net</link>
	<description>Because FLOSS is handy, isn&#039;t it?</description>
	<lastBuildDate>Mon, 30 Aug 2010 10:37:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>MediaWiki: URL beautification HowTo</title>
		<link>http://handyfloss.net/2008.11/mediawiki-url-beautification-howto/</link>
		<comments>http://handyfloss.net/2008.11/mediawiki-url-beautification-howto/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 19:35:32 +0000</pubDate>
		<dc:creator>isilanes</dc:creator>
				<category><![CDATA[Free software and related beasts]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[Wikipedia]]></category>

		<guid isPermaLink="false">http://handyfloss.net/?p=546</guid>
		<description><![CDATA[The default MediaWiki installation will leave you with URLs of the type: http://mywiki.site.tld/wiki/wiki/index.php?title=Article_name This is ugly! Following instructions at the MediaWiki.org site, you can make it simpler and nicer: http://mywiki.site.tld/wiki/Article_name To achieve that, add the following to /etc/apache2/httpd.conf: AcceptPathInfo On Alias /wiki /usr/share/mediawiki/index.php Then add/modify the following at /var/lib/mediawiki/LocalSettings.php (again, Debian default path): $wgScriptPath = [...]]]></description>
			<content:encoded><![CDATA[<p>The default <a href="http://en.wikipedia.org/wiki/MediaWiki">MediaWiki</a> installation will leave you with <a href="http://en.wikipedia.org/wiki/URL">URL</a>s of the type:</p>
<div class="codeblock">http://mywiki.site.tld/wiki/wiki/index.php?title=Article_name</div>
<p>This is ugly! Following instructions at the <a href="http://www.mediawiki.org/wiki/Manual:Short_URL">MediaWiki.org site</a>, you can make it simpler and nicer:</p>
<div class="codeblock">http://mywiki.site.tld/wiki/Article_name</div>
<p>To achieve that, add the following to <tt>/etc/apache2/httpd.conf</tt>:</p>
<div class="codeblock">
AcceptPathInfo On<br />
Alias /wiki      /usr/share/mediawiki/index.php
</div>
<p>Then add/modify the following at <tt>/var/lib/mediawiki/LocalSettings.php</tt> (again, Debian default path):</p>
<div class="codeblock">
$wgScriptPath  = &#39;/w&#39;;         # Path to the actual files. This should already be there<br />
$wgArticlePath = &#39;/wiki/$1&#39;;  # This directory MUST be different from $wgScriptPath<br />
$wgUsePathInfo = true;
</div>
<p>Recall that you must have <b>two</b> &#8220;directories&#8221;, which in the example above are <tt>/w</tt> and <tt>/wiki</tt>. The former is &#8220;real&#8221; and the latter is &#8220;virtual&#8221;.</p>
<p>The <b>real</b> dir (the one used as value for <tt>$wgScriptPath</tt>) must contain the MediaWiki files, thus it must point to the <tt>/usr/share/mediawiki</tt> dir. To this end, it must either exist in the <a href="http://en.wikipedia.org/wiki/Apache HTTP Server">Apache</a> root (usually <tt>/var/www/</tt>), or be an alias. If you follow the first route, you can make a link, like in the following example:</p>
<div class="codeblock">
% ln -s /usr/share/mediawiki /var/www/w
</div>
<p>The second route would imply adding this line to <tt>/etc/apache2/httpd.conf</tt>:</p>
<div class="codeblock">
Alias /w  /usr/share/mediawiki
</div>
<p>The latter requires restarting the Apache daemon, but I personally prefer it.</p>
<p>The <b>virtual</b> dir (the one used as value for <tt>$wgArticlePath</tt>) will be our path to get rid of the URL ugliness, and point directly to an article&#8217;s title. As such, it must be aliased in <tt>/etc/apache2/httpd.conf</tt> adding the following line to it, as mentioned above:</p>
<div class="codeblock">
Alias /wiki  /usr/share/mediawiki/index.php
</div>
<p>Finally, you shold enable the <code>rewrite</code> PHP module, if it&#8217;s not enable already, and reload Apache:</p>
<div class="codeblock">
% cd /etc/apache2/mods-enable/<br />
% ln -s ../mods-available/rewrite.load .<br />
% /etc/init.d/apache2 reload
</div>
<p>After that, pointing to <i>website</i>/wiki/<i>somearticle</i> should lead you to the wiki page for <i>somearticle</i>. For more information, refer to the <a href="http://www.mediawiki.org/wiki/Manual:Short_URL">MediaWiki.org site</a>.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://handyfloss.net/2009.04/my-ubuntu-jaunty-jackalope-upgrade-plan/" title="My Ubuntu Jaunty Jackalope upgrade plan (April 27, 2009)">My Ubuntu Jaunty Jackalope upgrade plan</a> (0)</li>
	<li><a href="http://handyfloss.net/2010.01/avoiding-time_increment_bits-problem-when-encoding-bad-header-mpeg4-videos-to-ogg-theora/" title="Avoiding time_increment_bits problem when encoding bad header MPEG4 videos to Ogg Theora (January 28, 2010)">Avoiding time_increment_bits problem when encoding bad header MPEG4 videos to Ogg Theora</a> (3)</li>
	<li><a href="http://handyfloss.net/2008.09/wikipedia-is-down/" title="Wikipedia is down (September 30, 2008)">Wikipedia is down</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://handyfloss.net/2008.11/mediawiki-url-beautification-howto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
