title: I have other system in sub-folder, how to write .htaccess?
body: <p>If I have a PHP system A(the .htaccess as follow) and I need to put other system B sub-folder under A's just like htp://www.a.com/B/
  how to change the code to make this work? (just because right now when I type htp://www.a.com/b/  can see login page, but when I login , will redirect to htp://www.a.com/index.php )</p>
  
  <h1>thanks!!</h1>
  
  <pre><code>RewriteEngine On
  RewriteBase "/"
  
  RewriteCond %{QUERY_STRING} rewrite
  RewriteRule .* - [L]
  
  RewriteRule index\.php(.*) $1 [R=302,L]
  
  RewriteRule ^$ "/index.php?rewrite" [qsa,L]
  
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d [OR]
  RewriteCond %{REQUEST_URI} \.(js|css|jpe?g|jpe|gif|png|ico)$ [NC]
  RewriteRule .* - [L]
  
  multiple rewrites
  RewriteRule /?(.*) "/index.php?rewrite=$1" [qsa,L]
  </code></pre>