Forum Moderators: phranque
<VirtualHost example.net:80>
ServerAdmin info@example.net
DocumentRoot /var/www/html
ServerName example.net
ErrorLog logs/example_error_log
CustomLog logs/example_log combined
RewriteEngine On
# Extract the member name from the host name
RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.net$ [NC]
# The main domain (www) is not a member name
RewriteCond %1 !^www$ [NC]
RewriteRule ^.*$ http://example.net/usertemps.php?user=%1 [L]
</VirtualHost>
<VirtualHost quux_foo.org:80>
ServerAdmin info@quux_foo.org
DocumentRoot /var/www/quux_foo.org
ServerName quux_foo.org
ErrorLog logs/quux_foo_error_log
CustomLog logs/quux_foo_log combined
RewriteEngine On
# Extract the member name from the host name
RewriteCond %{HTTP_HOST} ^([^.]+)\.quux_foo\.org$ [NC]
# The main domain (www) is not a member name
RewriteCond %1 !^www$ [NC]
RewriteRule ^.*$ http://quux_foo.org/usertemps.php?user=%1 [L]
</VirtualHost>
[edited by: jdMorgan at 11:15 pm (utc) on Aug. 16, 2004]
[edit reason] Removed specifics per TOS [/edit]
Welcome to WebmasterWorld!
I can't say that this will fix it, but you should use canonical URLs as RewriteRule substitutions only when you are doing external redirects. Try using the form:
RewriteRule ^.*$ /usertemps.php?user=%1 [L]
Jim