On May 18, 1:06 pm, "HansH" <h...@invalid.invalid> wrote:
> "Csaba Gabor" <dans...@gmail.com> schreef in berichtnews:1179480729.038170.84650@u30g2000hsc.go oglegroups.com...> OK, I am passing some convoluted urls back to apache and evidently
> > apache does not like by backspace. Is there anything that I can do to
> > have apache accept them?
>
> > The following works just fine:
> >http://mydomain.org/DE/d
^|
[^;:]{7}(;|:|$)/o:-DE;US;-US
>
> > but the following fails (the only difference is [^;:] goes to \w):
> >http://mydomain.org/DE/d
^|
\w{7}(;|:|$)/o:-DE;US;-US
>
> That's a back_slash_ not a back_space_.
>
> Naming it correctly allows you to find a related directive:http://httpd.apache.org/docs/2.2/mod...encodedslashes
>
> HansH
Drat. You are correct about the title. Sorry about that.
Thanks for your response Hans - that was a very useful link, much
appreciated. Tried it right out.
Unfortunately, although apache accepts the backslash, it converts it
to a forward slash. Major bummer.
I have a solution to my original problem although I am not very happy
about it.
In apache's configuration file, httpd.conf, (or in my case: httpd-
vhosts.conf) under my virtual domain I put:
ErrorDocument 404 "/search.php"
Search.php is the page that would otherwise be handling the request.
In Search.php I added the third line (the first two were already
there):
$path_info = @$_SERVER['ORIG_PATH_INFO'];
if (!$path_info) $path_info = @$_SERVER['PATH_INFO'];
if (($ru=$_SERVER['REDIRECT_URL']) && !$path_info) $path_info = $ru;
And everything appears to be working again.
I found this approach at:
http://www.devarticles.com/c/a/Apach...ents-with-PHP/
Csaba Gabor from Vienna