Alternate User Directories


RewriteEngine On RewriteCond %{HTTP_HOST} !^(www\.) RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com RewriteRule ^(.*)$ /home/%1/public_html$1


If you do not want to enable mod_dir, or you need a slightly different functionality than it offers, you may want to consider using mod_vhost_alias or mod_rewrite. The example shows how to use mod_rewrite to map requests for user.example.com to the appropriate per-user html directory.




Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net