[plug] Apache help
Matt Kemner
zombie at wasp.net.au
Tue Aug 8 14:12:14 WST 2000
On Tue, 8 Aug 2000, Gavin Rogers wrote:
> Is there any way to get apache to redirect incoming requests with a URL with
> whitespace in it to a URL with a %20 where the space was, which makes Netscape
I don't think that would solve your problem, because the problem is
not that Apache is receiving incoming requests with spaces in them, rather
that Apache is not receiving those requests at all because it's being
stopped by Netscape (unless I'm misreading your email).
The only way to fix it would be to either change the pages that have the
invalid URLs, or write a CGI script that filters out the spaces
on-the-fly.
eg you could use Apache's redirect rules to redirect all webpage requests
to /cgi-bin/showpage.cgi?original_url where showpage.cgi is a perl script
that runs the s/ /%20/ regex on the local file, and then displays it.
I'd hate to think about the amount of CPU resources you'd need to have
your entire website served by CGI though.
> If it can't be done in apache, then each page will have to be changed... and
> there's lots of them :-)
So you'd better make a start soon :)
Either that or educate your students on HTTP standards, and explain to
them that if they want to be web developers they need to learn to write
"portable" HTML, rather than rely on "features" that are browser specific
(and get _them_ to change their webpages)
Also it shouldn't be too hard to write a Perl script that scans a
directory tree for files with the .htm or .html extension, and modifies
them according to the regex you give it.
- Matt
More information about the plug
mailing list