<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
That's exactly what's happening. You are sending an internal request to
another page, so .htaccess is parsed again and tries to rewrite again
(and again and again).<br>
<br>
Here's a simple solution that I think will achieve what you want:<br>
<br>
RewriteEngine On<br>
RewriteCond %{HTTP_HOST} !^apps\. [NC]<br>
RewriteCond %{HTTP_HOST} ^([^.]+).example.com$<br>
#Below stops the looping by making sure the request isn't for what you
rewrote the request too.<br>
RewriteCond %{REQUEST_FILENAME} !^members/index.php<br>
RewriteRule (.*) members/index.php?sd=%1&amp;q=$1 [L,QSA]<br>
<br>
Now in your application you'll have 2 $_GET variables. One will be 'sd'
containing the subdomain and then 'q' (to use some Drupal goodness)
that contains the request path.<br>
<pre class="moz-signature" cols="72">Jamie Holly
<a class="moz-txt-link-freetext" href="http://www.intoxination.net">http://www.intoxination.net</a> 
<a class="moz-txt-link-freetext" href="http://www.hollyit.net">http://www.hollyit.net</a></pre>
<br>
On 3/3/2010 5:24 AM, Ashraf Amayreh wrote:
<blockquote
 cite="mid:a53d1b3b1003030224p5b4c85ekee6315ff95d39987@mail.gmail.com"
 type="cite">
  <div dir="ltr">Afraid not, adding an [L] didn't do any good. I'm
still getting an internal server error that I'm presuming is caused by
applying the rule indefinitely to the rewritten result. Is this the
normal behavior of .htaccess files? I'm pasting the full content of the
.htaccess file on the site root:<br>
  <br>
RewriteEngine On<br>
RewriteCond %{HTTP_HOST} ^(.*).<a moz-do-not-send="true"
 href="http://example.com">example.com</a><br>
RewriteRule (.*) ${tryme:%1}/$1 [L]<br>
  <br>
I'm very sure the application is working properly because I can run it
standalone and it works fine (returns either NULL or key followed by
newline).<br clear="all">
  <br>
-- <br>
Best Regards,<br>
Ashraf Amayreh<br>
CEO | O-Minds<br>
Cell. 962 78 8099997<br>
Tel. 962 6 5655150<br>
Fax. 962 6 5675150<br>
  <br>
  <a moz-do-not-send="true" href="http://o-minds.com">o-minds.com</a><br>
web development | web design<br>
user experience | branding design<br>
  </div>
</blockquote>
</body>
</html>