Need help

Using a single web hosting account to host multiple sites

Need help

Postby schmidtjason1 » Fri Oct 16, 2009 7:30 pm

I'm newbie to mod_rewrite and need help with the following:

1. Transfer to
2. Append the following query string to each link: user=domainuser

Please help.
Posts: 1
Joined: Fri Oct 16, 2009 7:23 pm

Postby richardk » Sat Oct 17, 2009 6:24 am

FAQ: Virtual sub domains.

Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.example\.com$ [NC]
RewriteRule ^(.*)$ /$1?user=%2 [QSA,L]
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 6 guests