[Discuss] Having trouble browsing a backed-up MediaWiki (PHP)
site.
noel at natnix.com
noel at natnix.com
Thu Sep 28 09:32:45 PDT 2006
Hi Alan,
This is an interesting problem! The problem is that even after URL
translation, your web server will always break urls at the "?".
I'd recommend against the Apache/mod_rewrite route. I don't think you
can make Apache ignore the "?".
You may want to try something based on Python's SimpleHttpServer:
http://docs.python.org/lib/module-SimpleHTTPServer.html. Start with
something like this, it may ignore '?' in file names right out of the
box:
===================================================
#! /usr/bin/python
"""
http_no_questions.py - serve files in the current directoy that
contain '?' in their names.
USAGE
http_no_questions.py <port>
then browse http://localhost:<port>
"""
import SimpleHTTPServer
import BaseHTTPServer
BaseHTTPServer.test(SimpleHTTPServer.SimpleHTTPRequestHandler,
BaseHTTPServer.HTTPServer)
===================================================
--Noel
On Wed, Sep 27, 2006 at 09:39:14PM -0700, Alan W. Irwin wrote:
> On 2006-09-28 01:56-0000 Michael Foltinek wrote:
>
> >I'm sort of pulling this out of /dev/ass, but I think that .htaccess
> >files in directories can override global settings from httpd.conf
>
> >From my documentation reading today, that appears to be true (if that
> privilege is granted for the directory), but what I need is something to
> place in that file to interpret URL's with embedded question marks simply as
> the corresponding static file name rather than being interpreted as the
> start of some query.
>
> By the way, anybody can test this problem for themselves if they have apache
> running a website. Stick a file in there with a question mark in its name
> (for example index?.html), and you will not be able to access that URL
> (unless you substitute %3f for the question mark). If you figure out how to
> access the URL without making the substitution, please let me know.
>
> I guess the real problem is that php (and therefore MediaWiki) tend to have
> really weird URL's that include all the internal query machinery rather than
> rational URL's that are easily remembered by humans. The result of the
> weird URL's is that when wget downloads all the results as a bunch of static
> files you get all these question marks in the file names which convinces
> browser software that you are actually making a query rather than referring
> to a simple static file name.
>
> I wonder whether mod_rewrite could effectively allow question marks in file
> names? I will have a look at this possibility tomorrow unless somebody has a
> better idea.
>
> Alan
> __________________________
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state implementation
> for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
> package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
> Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
> (lbproject.sf.net).
> __________________________
>
> Linux-powered Science
> __________________________
> _______________________________________________
> Discuss mailing list
> Discuss at vlug.org
> http://ladybug.vlug.org/cgi-bin/mailman/listinfo/discuss
More information about the Discuss
mailing list