|
Posted by Rik on 12/15/06 16:56
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]
|