|
Posted by Kentor on 12/15/06 18:18
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 =/
thanks for your help :)
Rik wrote:
> Kentor wrote:
> > Ok this is really strange... =/ nothing works.
> >
> > If i use the 3 lines you gave me:
> >
> > RewriteCond %{HTTP_HOST} ^([^.]+\).mywebsitehere.com
> > RewriteCond %{HTTP_HOST} !^www\.
> > RewriteRule ^(.*)$ searchForm.php?location=%1&foo=$1 [L,QSA]
> >
> > then my whole website is dead and i get this everywhere:
>
> Internal Server Error is usually a syntax problem.
>
> Let's try:
>
> RewriteEngine On
> RewriteBase /
> RewriteCond %{HTTP_HOST} ^([^.]+)\.
> RewriteCond %{HTTP_HOST} !^www\.
> RewriteRule ^(.*)$ searchForm.php?location=%1&foo=$1 [L,QSA]
>
> It works here, using http://text.localhost/text.ext (which points to
> http://blaat.localhost/:
> ---searchForm.php---
> <?php var_dump($_REQUEST); ?>
> --------------------
> Output:
>
> array(2) { ["location"]=> string(4) "test" ["foo"]=> string(8) "test.ext" }
>
> Grtz,
> --
> Rik Wasmus
Navigation:
[Reply to this message]
|