[Mediawiki-l] Upgrade has broken pretty url's

coptang at gmail.com coptang at gmail.com
Mon Feb 25 07:31:34 UTC 2008


On 23/02/2008, coptang at gmail.com <coptang at gmail.com> wrote:
> On 23/02/2008, Thomas Dalton <thomas.dalton at gmail.com> wrote:
>
> > >  b) If I leave the rewrite rules then set $wgArticlePath      =
>  >  >  "$wgScript?title=$1"; then URL's of the format
>  >  >  (http://wiki.themixingbowl.org/w/index.php?title=Special:Userlogin&returnto=FAQ)
>  >  >  work fine again.
>  >
>  >
>  > This seems odd to me... as far as I know, $wgArticlePath is only used
>  >  when automatically generating links, it shouldn't have any affect when
>  >  going directly to a URL. You should probably have it set to "/wiki/$1"
>  >  rather than just "/$1", though, otherwise you'll have problems with
>  >  articles called things like "w/" or "robots.txt".
>  >
>
>
> Very odd! Looking at webrequest.php I've found a way to fix it (for
>  small values of fix ;-))
>  To stop it matching on url's that start /w/blahblah I've added this to
>  the start of extractTitle
>                 global $wgScriptPath;
>                 if (strpos($path, $wgScriptPath.'/') === 0) {
>                         return array();
>                 }
>
>  Which is horrible I know but at least it's now working + I know where
>  it's going wrong. Basically extractTitle is matching when my url's
>  begin /w/index.php?title=blah when I'm guessing it probably shouldn't.
>
>  Any advice to fix it properly so I can remove my hack would be greatly
>  appreciated.
>
>  Many thanks
>

Bump ;-)

Any advice on this one or is there another list I should be asking on?
I assume that it shouldn't be a bug as it's working fine on the
mediawiki site (albeit in a slightly different way).

Thanks



More information about the MediaWiki-l mailing list