<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://htyp.org/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bilby</id>
	<title>HTYP - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://htyp.org/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bilby"/>
	<link rel="alternate" type="text/html" href="https://htyp.org/Special:Contributions/Bilby"/>
	<updated>2026-06-25T13:27:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://htyp.org/mw/index.php?title=MediaWiki/archive/customizing/URLs&amp;diff=8898</id>
		<title>MediaWiki/archive/customizing/URLs</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=MediaWiki/archive/customizing/URLs&amp;diff=8898"/>
		<updated>2007-12-02T16:08:20Z</updated>

		<summary type="html">&lt;p&gt;Bilby: /* Comments */  Yay, it worked!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;nocaaccae&lt;br /&gt;
==Navigation==&lt;br /&gt;
{{web software|MediaWiki}}: [[MediaWiki customization|customization]]: [[shortening MediaWiki URLs]]{{sidebar|__TOC__}}&lt;br /&gt;
==Overview==&lt;br /&gt;
The most reliable method seems to be the mod_rewrite, which requires access to either httpd.conf or requires particular handling options for .htaccess to be switched on (fortunately, they usually seem to be). Failing that, another method is:&lt;br /&gt;
* [[using error handlers to tidy MediaWiki URLs]]&lt;br /&gt;
&lt;br /&gt;
Some additional methods are documented [http://meta.wikimedia.org/wiki/Eliminating_index.php_from_the_url here].&lt;br /&gt;
==Using mod_rewrite==&lt;br /&gt;
This is probably documented elsewhere, but this is what actually worked on a shared server without root access or a shell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, the .htaccess file needs to include:&lt;br /&gt;
{{quoteon}}&lt;br /&gt;
:&amp;amp;lt;IfModule [[mod_rewrite]].c&amp;amp;gt;&lt;br /&gt;
::RewriteEngine on&lt;br /&gt;
::&lt;br /&gt;
::RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
::RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;
::RewriteRule ^(.*)$ index.php/$1 [L,QSA]&lt;br /&gt;
:&amp;amp;lt;/IfModule&amp;amp;gt;&lt;br /&gt;
{{quoteoff}}&lt;br /&gt;
&lt;br /&gt;
Second, modify LocalSettings.php:&lt;br /&gt;
:$wgScriptPath = &#039;&#039;;&lt;br /&gt;
:wgArticlePath = $wgScriptPath.&#039;/$1&#039;;&lt;br /&gt;
&lt;br /&gt;
This assumes MediaWiki is installed in the root of the www pages, e.g. &amp;lt;nowiki&amp;gt;http://yourdomain.com/Main_Page&amp;lt;/nowiki&amp;gt; is the wiki&#039;s main page; if you have it in a subfolder, e.g. &amp;lt;nowiki&amp;gt;http://yourdomain.com/wiki/Main_Page&amp;lt;/nowiki&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
:$wgScriptPath = &#039;/wiki&#039;;&lt;br /&gt;
&lt;br /&gt;
Then do ?action=purge on any page to test it. Internal links on existing pages will convert to the new URLs any time they are saved or purged.&lt;br /&gt;
&lt;br /&gt;
The above seems to work for everything (including editing) without breaking old-style URLs.&lt;br /&gt;
&lt;br /&gt;
This method is also documented here, with some minor changes: http://wiki.welldesignedurls.org/Clean_Urls_for_MediaWiki&lt;br /&gt;
&lt;br /&gt;
Wish list:&lt;br /&gt;
* proper handling of page named [[.htaccess]] (click on that for a demonstration of the problem)&lt;br /&gt;
* ability to have the wiki installed in a subdirectory while still making it appear to be in the domain&#039;s root folder&lt;br /&gt;
&lt;br /&gt;
==Comments==&lt;br /&gt;
Please feel free to post comments here or on the Talk page if you try any of these procedures.&lt;br /&gt;
&lt;br /&gt;
-------------------------&lt;br /&gt;
6/23/2007: I used your .htaccess and then set &#039;&#039;$wgArticlePath = &amp;quot;$wgScriptPath/$1&amp;quot;;&#039;&#039;. This way the forwarding works regardless of what directory the wiki is located in. In my case it was &#039;&#039;/wiki&#039;&#039;. --Jordan Mendler ({{email|jmendler|ucla|edu}})&lt;br /&gt;
-------------------------&lt;br /&gt;
12/02/2007: Method worked fine, using Jordan Mendler&#039;s modification to allow for my &#039;&#039;/wiki&#039;&#039; subdirectory. You should post this on mediawiki&#039;s [http://www.mediawiki.org/wiki/Manual:Short_URL Manual:Short URL] page, as they do not have this solution listed and it seems simpler and possibly less bug-prone then other methods. --Adam Burley (AKA Bilby) (bilbyATdigitalcaveDOTorg)&lt;br /&gt;
-------------------------&lt;/div&gt;</summary>
		<author><name>Bilby</name></author>
	</entry>
</feed>