--- .htaccess 2008-01-22 04:01:39.000000000 -0500 +++ .htaccess 2008-03-20 15:22:54.000000000 -0400 @@ -104,6 +104,17 @@ DirectoryIndex index.php #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$ #RewriteRule module.php index.php?q=%1 [L] + # REQUIRED BY SUBDOMAIN.MODULE + # Moves subdomain to URI path + # e.g: mysubdomain.example.com + # becomes example.com/index.php?_mysubdomain/ + # NOTE: does not rewrite subdomain if it is "www". + # If you want it to rewrite www, disable the 2nd line + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{HTTP_HOST} !^www\.([^.]+)\.([^.]+)$ + RewriteCond %{HTTP_HOST} ^([^.]+)\.([^.]+)\.([^.]+)$ + RewriteRule ^(.*)$ index.php?q=_%1/$1 [L] + # Rewrite current-style URLs of the form 'index.php?q=x'. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d