Re: RewriteUrl + open_basedir

From: Date: Wed, 02 Jun 2004 08:53:28 +0000
Subject: Re: RewriteUrl + open_basedir
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187429@lists.php.net to get a copy of this message
Markus Post a écrit :
DocumentRoot /srv/www
RewriteRule ^/(.*)/(.*)$                /$1/$2
This redirects the request http://domain.de/dir1/dir2 to the local files /srv/www/dir1/dir2/ and works fine.
No RewriteRule necessary to do this: '/dir1/dir2' becomes '/dir1/dir2' btw RewriteRule ^/([^/]+)/(.*)$ /$1/$2 is little better
    coz '.' can match '/' and /d1/d2/d3 is then no more ambiguous
    See http://httpd.apache.org/docs/mod/mod_rewrite.html
    and http://httpd.apache.org/docs/misc/rewriteguide.html
"php_admin_value open_basedir /srv/www/$1", but it doesn´t work.
open_basedir can use multiple (: or ; separated) dirs if you want See http://www.php.net/features.safe-mode Perhaps you meant something like this: NameVirtualHost 1.2.3.4 NameVirtualHost 5.6.7.8 <VirtualHost 1.2.3.4> ServerName site1.com DocumentRoot /var/www/site1 php_admin_value open_basedir /var/www/site1 </VirtualHost> <VirtualHost 5.6.7.8> ServerName site2.com DocumentRoot /var/www/site2 php_admin_value open_basedir /var/www/site1 </VirtualHost> Or perhaps you want something more sophisticated, like Dynamically configured mass virtual hosting http://httpd.apache.org/docs/vhosts/mass.html Hope it helps Christophe

« previous php.general (#187429) next »