title: .htaccess redirect if ANY query string is present?
body: <p>I have the following .htaccess at present.</p>
  
  <pre><code>&lt;IfModule mod_suphp.c&gt;
   suPHP_ConfigPath /home/abc/php.ini
  &lt;/IfModule&gt;
  
  RewriteEngine on
  RewriteCond $1 !^(index\.php|media|css|js|images|robots\.txt)
  RewriteRule ^(.*)$ /index.php/$1 [L]
  
  AuthType Basic
  AuthName "Está dominado!!"
  AuthUserFile "/home/abc/.htpasswds/public_html/passwd"
  require valid-user
  </code></pre>
  
  <p>Now the thing is, I would like to, if any query string is found after a / remove that query string.</p>
  
  <p>So: 
  If we have: </p>
  
  <blockquote>
    <p><strong>http://www.abc.com/</strong>?somethinghere234</p>
  </blockquote>
  
  <p>It should redirect to:</p>
  
  <blockquote>
    <p><strong>http://www.abc.com/</strong></p>
  </blockquote>
  
  <p>If we have: </p>
  
  <blockquote>
    <p><strong>htpp://www.abc.com/something/</strong>?id212</p>
  </blockquote>
  
  <p>Redirect to: </p>
  
  <blockquote>
    <p><strong>htpp://www.abc.com/something/</strong></p>
  </blockquote>
  
  <p>UPDATE:
  I've tried this:</p>
  
  <p><strong>TRY A)</strong></p>
  
  <pre><code>RewriteCond %{QUERY_STRING} ^(.*)$
  RewriteCond %{REQUEST_URI} !^/index.php
  RewriteRule .* /index.php/ [L,QSA]
  </code></pre>
  
  <p>Hopping that  ^(.*)$ will allow anything on the query string...</p>
  
  <p>I've also tried this:</p>
  
  <p><strong>TRY B)</strong></p>
  
  <blockquote>
    <p>RewriteEngine on RewriteCond $1
    !^(index.php|media|css|js|images|robots.txt)
    RewriteCond %{QUERY_STRING} ^(.<em>)$
    RewriteRule ^(.</em>)$ <a href="http://abc.com/" rel="nofollow">http://abc.com/</a> [L]</p>
  </blockquote>
  
  <p>This returns a 500 internal server error.</p>
  
  <p><strong>TRY C)</strong></p>
  
  <pre><code>RewriteEngine on
  RewriteCond $1 !^(index\.php|media|css|js|images|robots\.txt)
  #RewriteCond %{REQUEST_URI} !^/index.php
  RewriteCond %{QUERY_STRING} ^(.*)$
  RewriteRule ^(.*)$ http://abc.com/ [R=302,L]
  </code></pre>
  
  <p>I confess I'm kind of lost on this .htaccess sintax.</p>
  
  <p><strong>TRY D)</strong></p>
  
  <pre><code>RewriteEngine on
  RewriteCond $1 !^(index\.php|media|css|js|images|robots\.txt)
  RewriteCond %{REQUEST_URI} !^/
  RewriteCond %{QUERY_STRING} ^(.*)$
  RewriteRule ^(.*)$ http://abc.com/ [R=302,L]
  </code></pre>
  
  <p>Please advice,
  MEM</p>