Apache

A zacneme hned “swiss army knife”

mod_rewrite

www.username.host.domain.com –> domain.com/foo/username/bar

HTTP/1.1 requests which contain a Host: HTTP header

RewriteEngine on
RewriteCond   %{HTTP_HOST}                 ^www\.[^.]+\.host\.com$
RewriteRule   ^(.+)                        %{HTTP_HOST}$1          [C]
RewriteRule   ^www\.([^.]+)\.host\.com(.*) /home/$1$2
 
linux/apache.txt · Last modified: 2009/01/04 02:09 by admin