title: Apache rewrite rule works for homepage but not links
body: <p>I have a site in a <code>/www/</code> folder. In the parent directory I have an .htaccess file which passes through the <code>/www/</code> directory so it is as if it does not exist.</p>
  
  <p>Within that folder I have Kirby CMS as a submodule which uses it's own rewrite rules for urls.  The homepage shows as <code>http://mywebsite.local</code> but the links are shown as <code>http://mywebsite.local/www/page-name</code>. They are dynamically generated in PHP and not hard coded.</p>
  
  <p><strong>Manually removing the <code>/www/</code> from the url shows that the redirect works fine.</strong> So it must be a Kirby issue.</p>
  
  <p><code>kirbycms</code> is a git submodule and I have followed this tutorial <a href="http://rimann.org/blog/kirby-git-setup" rel="nofollow">http://rimann.org/blog/kirby-git-setup</a>.</p>
  
  <p>Structure:</p>
  
  <pre><code>|- .htaccess
  |- www
  |- |- index.php
  |- |- .htaccess
  |- |- kirbycms
  |- |- |- kirby
  |- |- themes
  |- |- |- v9
  |- |- |- |- site
  </code></pre>
  
  <p>root .htaccess:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond $1 !^www/
      RewriteRule ^(.*)$ www/$1 [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>kirby .htaccess:</p>
  
  <pre><code># Kirby .htaccess
  
  # rewrite rules
  &lt;IfModule mod_rewrite.c&gt;
  
  # enable awesome urls. i.e.:
  # http://yourdomain.com/about-us/team
  RewriteEngine on
  
  # make sure to set the RewriteBase correctly
  # if you are running the site in a subfolder.
  # Otherwise links or the entire site will break.
  #
  # If your homepage is http://yourdomain.com/mysite
  # Set the RewriteBase to:
  #
  # RewriteBase /mysite
  #
  RewriteBase /
  
  # block text files in the content folder from being accessed directly
  RewriteRule ^content/(.*)\.(txt|md|mdown)$ error [R=301,L]
  
  # block all files in the site folder from being accessed directly
  RewriteRule ^site/(.*) error [R=301,L]
  
  # block all files in the kirby folder from being accessed directly
  RewriteRule ^kirby/(.*) error [R=301,L]
  
  # leave robots.txt alone for search engines
  RewriteRule ^robots.txt robots.txt [L]
  
  # make panel links work
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^panel/(.*) panel/index.php [L]
  
  # make site links work
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*) index.php [L]
  
  &lt;/IfModule&gt;
  
  
  # Additional recommended values
  # Remove comments for those you want to use.
  #
  # AddDefaultCharset UTF-8
  #
  # php_flag short_open_tag on
  </code></pre>
  
  <p>index.php:</p>
  
  <pre><code>&lt;?php
  
  /*
  
  ---------------------------------------
  Document root of your site
  ---------------------------------------
  this should be identical with the directory
  in which your index.php is located
  
  */
  
  $root = dirname(__FILE__);
  
  
  
  /*
  
  ---------------------------------------
  Kirby system folder
  ---------------------------------------
  
  by default this is located inside the root directory
  but if you want to share one system folder for
  multiple sites, you can easily change that here
  and link to a shared kirby folder somewhere on your
  server
  
  */
  
  $rootKirby = $root . '/kirbycms/kirby';
  
  
  
  /*
  
  ---------------------------------------
  Your site folder
  ---------------------------------------
  
  Your site folder contains all the site specific files
  like templates and snippets. It is located in the root
  directory by default, but you can move it if you want.
  
  */
  
  $rootSite = $root . '/theme/v9/site';
  
  
  
  /*
  
  ---------------------------------------
  Your content folder
  ---------------------------------------
  
  Your content folder is also located in the root
  directory by default. You can change this here.
  It can also be changed later in your site/config.php
  
  */
  
  $rootContent = $root . '/content';
  
  
  // Try to load Kirby
  if(!file_exists($rootKirby . '/system.php')) {
    die('The Kirby system could not be loaded');
  }
  
  require_once($rootKirby . '/system.php');
  </code></pre>
  
  <p>Does anyone know how I can set the links so they don't have the <code>/www/</code>?</p>