Mailing List Archive

mod_rewrite snarfs image uploads and stylesheet(?) snarfs on Mozilla
(take two)

Hi there,

I've got Mediawiki 1.1.0 installed and running happily except for:

1) URL rewriting and image uploads. I've got the software installed in /w/,
and articles are referenced by /wiki/Article_title. Now, when I upload an
image, it arrives happily, sits in the upload directory, and disappears. The
software trys to find /wiki/2/2d/image.jpg, but this gets automagically
rewritten so that instead of pulling out the image, we get a blank article
page called 2/2d/image.jpg. This sounds like it should be easily fixable,
but I can't quite see how.

The default stylesheet is quite badly confused on my default browser, Moz
1.2.1. Page breaks are thrown randomly across the screen and it's impossible
to click anything on the top bar or in the article text. I assume it's a
local problem, cos wikipedia itself is fine. Any clues? FWIW, it's fine with
Konqueror.

Any thoughts much appreciated :)

Cheers,
Calum
Re: mod_rewrite snarfs image uploads and stylesheet(?) snarfs on Mozilla [ In reply to ]
On Feb 28, 2004, at 02:24, Calum Galleitch wrote:
> 1) URL rewriting and image uploads. I've got the software installed
> in /w/,
> and articles are referenced by /wiki/Article_title. Now, when I upload
> an
> image, it arrives happily, sits in the upload directory, and
> disappears. The
> software trys to find /wiki/2/2d/image.jpg, but this gets automagically
> rewritten so that instead of pulling out the image, we get a blank
> article
> page called 2/2d/image.jpg. This sounds like it should be easily
> fixable,
> but I can't quite see how.

You have to set $wgUploadPath correctly. This might be /w/upload, or
wherever you're actually putting the files. If you've got a /wiki
directory, it's now hidden by the rewrite and nothing can be reached
there.

> The default stylesheet is quite badly confused on my default browser,
> Moz
> 1.2.1. Page breaks are thrown randomly across the screen and it's
> impossible
> to click anything on the top bar or in the article text. I assume it's
> a
> local problem, cos wikipedia itself is fine. Any clues? FWIW, it's
> fine with
> Konqueror.

You have to set $wgStyleSheetPath to the actual location, as with the
upload directory.

-- brion vibber (brion @ pobox.com)
Re: mod_rewrite snarfs image uploads and stylesheet(?) snarfs on Mozilla [ In reply to ]
On Saturday 28 February 2004 11:15, Brion Vibber wrote:

> You have to set $wgUploadPath correctly. This might be /w/upload, or
> wherever you're actually putting the files. If you've got a /wiki
> directory, it's now hidden by the rewrite and nothing can be reached
> there.
>

I see, thank you. Would it be possible to move some of the code around so it
happens automatically, so that things like $wgStyleSheetPath and so on are
dependent on the LocalSettings.php $wgScriptPath rather than ending up as
whatever was in DefaultSettings.php? Or is there a good reason it isn't done
this way?

Cheers,
Calum
Re: mod_rewrite snarfs image uploads and stylesheet(?) snarfs on Mozilla [ In reply to ]
On Feb 28, 2004, at 04:08, Calum Galleitch wrote:
> On Saturday 28 February 2004 11:15, Brion Vibber wrote:
>> You have to set $wgUploadPath correctly. This might be /w/upload, or
>> wherever you're actually putting the files. If you've got a /wiki
>> directory, it's now hidden by the rewrite and nothing can be reached
>> there.
>
> I see, thank you. Would it be possible to move some of the code
> around so it
> happens automatically, so that things like $wgStyleSheetPath and so on
> are
> dependent on the LocalSettings.php $wgScriptPath rather than ending up
> as
> whatever was in DefaultSettings.php? Or is there a good reason it
> isn't done
> this way?

The old sample LocalSettings file was really really bad and misleading.
See the LocalSettings.sample in the 1.2.0rc1 release, it includes the
necessary bits to do this right.

-- brion vibber (brion @ pobox.com)