Re: mod_rewrite problem
| From: | CC Zona | Date: | Thu, 18 Jul 2002 15:09:28 +0000 |
| Subject: | Re: mod_rewrite problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-108271@lists.php.net to get a copy of this message | ||
In article <003d01c22e58$dcb45240$6601a8c0@yourwrjlo8t8dt>,
adrian.murphy@2020tourism.com (Adrian Murphy) wrote:
> 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.
<snip>
> 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
Change each of those instances of "^www\." to "^(www\.)?"
--
CC