Björn Dieding@xrow.de
|
Wednesday 12 January 2005 12:32:30 am
I have notice the following... When i have the setup mentioned in the title, I always get my systems urls like that... http://host/index.php?/alias/to/node Is there a way to take out the "index.php?" from the URL? Or is there some kind of resriction because of the cgi like that parameteres can't be passed if you use urls like "http://host/alias/to/node"?
Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/
|
Derick Rethans
|
Wednesday 12 January 2005 12:45:58 am
I think this is a bug, which I fixed (but not committed yet). Can you try the following:
Index: lib/ezutils/classes/ezsys.php
===================================================================
--- lib/ezutils/classes/ezsys.php (revision 10512)
+++ lib/ezutils/classes/ezsys.php (working copy)
@@ -615,7 +615,7 @@
\return the variable named \a $variableName in the global \c $_SERVER variable.
If the variable is not present an error is shown and \c null is returned.
*/
- function &serverVariable( $variableName, $quiet = false )
+ function serverVariable( $variableName, $quiet = false )
{
if ( !isset( $_SERVER[$variableName] ) )
{
@@ -780,6 +780,7 @@
eZDebug::writeNotice( eZSys::serverVariable( 'PHP_SELF' ), 'PHP_SELF' );
eZDebug::writeNotice( eZSys::serverVariable( 'SCRIPT_FILENAME' ), 'SCRIPT_FILENAME' );
eZDebug::writeNotice( eZSys::serverVariable( 'DOCUMENT_ROOT' ), 'DOCUMENT_ROOT' );
+ eZDebug::writeNotice( eZSys::serverVariable( 'REQUEST_URI' ), 'REQUEST_URI' );
eZDebug::writeNotice( ini_get( 'include_path' ), 'include_path' );
}
@@ -825,6 +826,7 @@
$scriptName = eZSys::serverVariable( 'SCRIPT_NAME' );
// Get the webdir.
+ $wwwDir = "";
if ( $force_VirtualHost && ! $isCGI )
{
$wwwDir = "";
@@ -868,7 +870,18 @@
// Get the right $_SERVER['REQUEST_URI'], when using nVH setup.
if ( ereg( "^$wwwDir$index(.*)", $phpSelf, $req ) )
{
- $requestURI = $req[1];
+ if (! $req[1] )
+ {
+ if ( ereg( "^$wwwDir(.*)", $requestURI, $req ) )
+ {
+ $requestURI = $req[1];
+ $index = '';
+ }
+ }
+ else
+ {
+ $requestURI = $req[1];
+ }
}
}
}
The reason why it's not committed yet because I couldn't test it in a lot of different situations yet.
|