https://issues.apache.org/bugzilla/show_bug.cgi?id=26052
arcadius <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #30 from arcadius <[email protected]> 2010-11-10 10:08:51 EST --- Another solution is to satisfy feature request "change DOCUMENT_ROOT via mod_rewrite": http://www.techlists.org/archives/web/apache-users/2002-07/msg01360.shtml http://www.techlists.org/archives/web/apache-users/2002-07/msg01379.shtml Currently mod_rewrite's directive "RewriteRule <src> <target> [E=DOCUMENT_ROOT:<desired value>]" creates environment variable 'REDIRECT_DOCUMENT_ROOT' if <target> is redirected by other directives; else it has no effect, DOCUMENT_ROOT is overwritten by Apache. Let's suppose that setting of environment variable DOCUMENT_ROOT by mod_rewrite will be processed in new special way (all other env. variables should not be affected): Apache changes its inner DOCUMENT_ROOT for current request to the value set by mod_rewrite, and corrects DOCUMENT_ROOT-relative paths (PATH_INFO, SCRIPT_NAME). Both inner Apache settings & corresponding environment variables should be corrected. If correction fails - return 500 Internal Server Error. Advantages of such solution: 1. Very small backward compatibility issue. If somebody tried to set DOCUMENT_ROOT by mod_rewrite, failed, but launched his experiment to production server(s) - he will have compatibility issue. So to be affected, one must have done very atypical & silly thing. 2. Administrators will be able to set correct DOCUMENT_ROOT value for VirtualDocumentRoot-s in configuration files, 3. Administrators & hosting customers with limited rights will be able to create subdomains by mod_rewrite. Currently this great Apache & mod_rewrite feature is not perfect: everything can be tuned (there are some tricks) except correcting DOCUMENT_ROOT. Kial's workaround is good for PHP scripts, but f.e. doesn't solve issue with listing of directory's content within subdomain with "Options +Indexes" (example: http://naobum.fedushin.ru/ ). -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
