|
Posted by Kentor on 12/15/06 18:54
All my stuff is in one dir but then again i use fake dirs with the
rewrite rule... so i dunno if need it... but iv been browsing the
website... and nothing seems to be broken.. so i guess its ok.. =)
thank you, thank you!
Now what do i do to go to another page on montreal.mysite.com like for
example to show the results for montreal after clicking a form..
montreal.mysite.com/results.html
which would normally be resultsOut.php?location=Montreal ...
Kentor wrote:
> okok now it works with www. :)
> so now i just need to understand whats the purpose of
> RewriteCond %{REQUEST_FILENAME} !-d
>
> because once i put this back, then montreal.mysite.com shows the page
> of mysite.com again... and im afraid to take it out cuz this line has
> been there before i started playing with sub-domains... so im afraid it
> will mess up all my other normal redirects...
>
> Rik wrote:
> > 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]
|