Re: [PHP] RewriteUrl + open_basedir

2004-06-02 Thread Christophe Chisogne
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] RewriteUrl + open_basedir

2004-05-29 Thread Markus Post
Hello everybody,

I want to use RewriteUrl and open_basedir-restriction in a virtual
host-directive together.

1) RewriteUrl

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.

2) Then I want use the open_basedir-restriction like
php_admin_value open_basedir /srv/www/dir1

To use it dynamically I want to use the content of the variable $1 in
the open_basedir-restriction. It would be sth. like this:
php_admin_value open_basedir /srv/www/$1, but it doesn´t work. The
variable $1 won´t parsed.

Do you know any other way?

Thanks,
   Markus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php