mod_rewrite problem
| From: | adrian murphy | Date: | Thu, 18 Jul 2002 12:44:09 +0000 |
| Subject: | mod_rewrite problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-108252@lists.php.net to get a copy of this message | ||
Hi,
the following code redirects www.usersite.mysite.biz to www.mysite.biz/users/sites/usersite
the problem is when the 'www' is left out it doesn't work.
could someone help me to fix this?
many thanks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.[^.]+\.mysite\.biz$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www\.([^.]+)\.mysite\.biz(.*) http://www.mysite.biz/users/sites/$1
RewriteCond %{HTTP_HOST} ^www\.[^.]+\.mysite\.ie$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www\.([^.]+)\.mysite\.ie(.*) http://www.mysite.biz/users/sites/$1
adrian.