[MediaWiki-l] Rewrite Rules

Daniel Friesen daniel at nadir-seen-fire.com
Fri Jan 18 00:54:58 UTC 2013


On Tue, 15 Jan 2013 22:53:00 -0800, Mark A. Hershberger  
<mah at everybody.org> wrote:

> On 01/15/2013 11:33 PM, Daniel Friesen wrote:
>> %{DOCUMENT_ROOT} is not wrong. Though /w/ is. And that ?title=$1
>> shouldn't be there.
>
> The rules work for me and others.  Your suggested rules work, I'm sure,
> but they make me cringe ("Ugh!") -- especially the
> %{DOCUMENT_ROOT}%{REQUEST_URI} bit instead of %{REQUEST_FILENAME}.

The current rules I'm suggesting are developed to work the best way and  
work in nearly all configuration situations.

%{DOCUMENT_ROOT}%{REQUEST_URI} comes out of an issue with  
%{REQUEST_FILENAME}. One day I discovered a user who had some unexpected  
when they tried to configure their root short urls. It turns out that when  
rewrite rules are placed directly into a <VirtualHost> block  
%{REQUEST_FILENAME} is empty. Which leads to bugs in the rewrite rules. So  
it was replaced with %{DOCUMENT_ROOT}%{REQUEST_URI} which ends up with  
pretty much the same value but is never blank.

> Can't we all be friends?
>


-- 
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://danielfriesen.name/]




More information about the MediaWiki-l mailing list