title: trailing slah with different directory in rewrite chain
body: <p>i got a problem which is probably caused cause of my strange directory structure. i got a folder where my page is in and inside this folder i got a folder named <code>/admin/</code> and <code>/frontend/</code>.</p>
  
  <p>i got the following inside <code>/.htaccess</code></p>
  
  <pre><code>DirectoryIndex index.html index.php
  
  RewriteEngine On
  RewriteBase /
  
  RewriteCond %{HTTP_HOST} mypage\.local$
  RewriteCond %{REQUEST_URI} !^/frontend
  RewriteRule ^(.*)$ /frontend/$1 [L]
  </code></pre>
  
  <p>then inside my <code>/frontend/</code> i got an index.php and there i set up what content will be displayed. inside <code>/admin/</code> i disable the mod rewrite and use normal url with .php requests.</p>
  
  <p>i got the following inside my <code>/frontend/.htaccess</code></p>
  
  <pre><code>RewriteEngine On
  RewriteBase /
  
  RewriteRule ^([A-Za-z_\-0-9]+)/$ /frontend/index.php?main=$1 [L,QSA]
  RewriteRule ^([A-Za-z_\-0-9]+)/([A-Za-z_\-0-9\.]+)/$ /frontend/index.php?main=$1&amp;sub=$2 [L,QSA]
  
  RewriteRule ^([A-Za-z_\-0-9\.\&amp;]+\.html)$ /frontend/index.php?main=html&amp;sub=$1 [L,QSA]
  </code></pre>
  
  <p>now urls like /test/ and /test/test/ will be redirected to my <code>/frontend/index.php</code> and i can perform actions.</p>
  
  <p>is there a possibility that i can catch all other urls and redirect to my index.php?</p>
  
  <p>if tried this, but then i get a 505</p>
  
  <pre><code>RewriteRule ^(.*)/$ /frontend/index.php?main=$1 [L,QSA]
  </code></pre>
  
  <p>thanks for any help.</p>