From: Matti A. <ma...@ik...> - 2002-10-31 21:37:49
|
to, 31-10-2002 kello 23:13, Matti Airas kirjoitti: > --clip----clip----clip----clip----clip----clip----clip----clip----clip-- > --- /tmp/phpwiki/lib/config.php 2002-09-27 16:40:34.000000000 +0300 > +++ lib/config.php 2002-10-31 22:09:29.000000000 +0200 > @@ -336,7 +336,13 @@ > > if (VIRTUAL_PATH != SCRIPT_NAME) { > // Apache action handlers are used. > - define('PATH_INFO_PREFIX', VIRTUAL_PATH . '/'); > + // There are differences in Apache versions in rgd. to how > PATH_INFO is > + // assembled. Test what the prefix should look like. > + if > (substr($HTTP_SERVER_VARS['PATH_INFO'],0,strlen(VIRTUAL_PATH))==VIRTUAL_PATH) { > + define('PATH_INFO_PREFIX', VIRTUAL_PATH . '/'); > + } else { > + define('PATH_INFO_PREFIX', '/'); > + } > } > else > define('PATH_INFO_PREFIX', '/'); > --clip----clip----clip----clip----clip----clip----clip----clip----clip-- Doh. Of course that patch gives a warning when accessing the main page (as PATH_INFO does not exist in that case). I'm open to suggestions, how to fix this more cleanly. :-) m. |