Posted by Rik on 12/15/06 18:29
Kentor wrote:
> yay it finally started working :) but it works only if i use
> http://montreal.mysite.com or montreal.mysite.com but if i use
> www.montreal.mysite.com or http://www.montreal.mysite.com i still get
> the main page of mysite.com... how can i fix this?
>
> i guess its this line... RewriteCond %{HTTP_HOST} !^www\.
> but if i take it out then even the main page mysite.com points to my
> searchform.php =/
Ah, it's in the same dir as your normal site?
Then I would change it to this:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)?([^.]+)\.mysite\.com
RewriteCond %{HTTP_HOST} !^www\.mysite\.com
RewriteRule ^(.*)$ searchForm.php?location=%2&foo=$1 [L,QSA]
#Note the change from %1 to %2!
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|